mcy567 commented on code in PR #8265: URL: https://github.com/apache/apisix/pull/8265#discussion_r1016227328
########## apisix/plugins/rizhiyi-logger.lua: ########## @@ -0,0 +1,153 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +local core = require("apisix.core") +local log_util = require("apisix.utils.log-util") +local bp_manager_mod = require("apisix.utils.batch-processor-manager") +local plugin = require("apisix.plugin") + +local tcp = ngx.socket.tcp + +local plugin_name = "rizhiyi-logger" +local batch_processor_manager = bp_manager_mod.new(plugin_name) + +---calc pri--- +local Facility = { Review Comment: 有在线文档,你需要在[日志易官网](https://www.rizhiyi.com/register/?utm_source=SAAS)注册完saas版本后在帮助文档里可以看到。日志易可以接收多种格式的日志并自动解析,当前这个插件是基于syslog日志格式开发的。格式如下:  这几天我写一下测试用例和使用文档。 ########## apisix/plugins/rizhiyi-logger.lua: ########## @@ -0,0 +1,153 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +local core = require("apisix.core") +local log_util = require("apisix.utils.log-util") +local bp_manager_mod = require("apisix.utils.batch-processor-manager") +local plugin = require("apisix.plugin") + +local tcp = ngx.socket.tcp + +local plugin_name = "rizhiyi-logger" +local batch_processor_manager = bp_manager_mod.new(plugin_name) + +---calc pri--- +local Facility = { Review Comment: > > 日志易可以接收多种格式的日志并自动解析,当前这个插件是基于syslog日志格式开发的 > > Just curious, can we use the existing syslog plugin to push logs to rizhiyi? 为了安全考虑,日志易对syslog的元数据有格式和内容要求,只有符合的才会被日志易接收,如果syslog插件支持定义syslog的元数据格式和内容,理论上也是可以的。不过,我看当前的syslog插件貌似不支持? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org