You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/07 10:17:34 UTC

[GitHub] [apisix] mcy567 opened a new pull request, #8265: add rizhiyi logger

mcy567 opened a new pull request, #8265:
URL: https://github.com/apache/apisix/pull/8265

   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   添加日志易logger
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1016662174


##########
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?



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017613422


##########
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:
   > 我说的元数据指的是**粗体**的部分,插件的元数据指的的是非粗体的部分(如果我没理解错的话)。
   
   So can we develop the existing `syslog` plugin and add configuration to make it support rizhiyi?



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] moonming commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
moonming commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1054133753


##########
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:
   Great. @mcy567 do you have time to continue this plugin?



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
spacewander commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1016193694


##########
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:
   Is there any doc for rizhiyi's log format?



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017935481


##########
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日志格式和sls比较类似,所以rizhiyi-logger插件的开发参考了sls-logger,它的本质其实也是发送的syslog。如果能开发出来这个功能,直接用syslog插件当然是可以的,不过对我来说可能有点困难。o(╥﹏╥)o
   > 
   > I think it may be more difficult to develop a new plugin ......
   
   不会,因为新插件已经开发完了。。你看这种情况是怎么处理,是等syslog插件的新功能吗,还是先使用这个插件?It's up to you!!



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017504956


##########
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插件支持定义syslog的元数据格式和内容
   
   we can also set the format of the logs by configuring the Plugin metadata , ref: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/sls-logger.md#metadata
   
   Even though the syslog documentation doesn't say so, it should be supported and used the same way. You can help to verify it.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add rizhiyi logger [apisix]

Posted by "mcy567 (via GitHub)" <gi...@apache.org>.
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日志格式开发的。格式如下:
   ![image](https://user-images.githubusercontent.com/22673808/200500238-dfb51fcf-c280-4ac7-90f7-673b037ff671.png)
   
   这几天我写一下测试用例和使用文档。



##########
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] moonming commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
moonming commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1053903686


##########
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:
   can we merge this PR?



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017616743


##########
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:
   > Even though the syslog documentation doesn't say so, it should be supported and used the same way. You can help to verify it.
   
   fix: not yet supported, waiting for #8279



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
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日志格式开发的。格式如下:
   ![image](https://user-images.githubusercontent.com/22673808/200500238-dfb51fcf-c280-4ac7-90f7-673b037ff671.png)
   
   这几天我写一下测试用例和使用文档。



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017911527


##########
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日志格式和sls比较类似,所以rizhiyi-logger插件的开发参考了sls-logger,它的本质其实也是发送的syslog。如果能开发出来这个功能,直接用syslog插件当然是可以的,不过对我来说可能有点困难。o(╥﹏╥)o
   
   I think it may be more difficult to develop a new plugin ......



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1054099143


##########
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:
   > can we merge this PR?
   
   Not. Reason: According to the discussion above, this feature does not require a new plugin, just need to make syslog support rizhiyi.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 closed pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
mcy567 closed pull request #8265: feat: add rizhiyi logger
URL: https://github.com/apache/apisix/pull/8265


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1018579222


##########
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插件的新功能吗,还是先使用这个插件?It's up to you!!
   
   IMO, you can wait for the #8279 merg, and add custom log format support on syslog to make log-util generated logs conform to a specific format, such as rizhiyi.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
hf400159 commented on PR #8265:
URL: https://github.com/apache/apisix/pull/8265#issuecomment-1306590398

   Please add test cases and documentation.


-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017347915


##########
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017638566


##########
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:
   > > 我说的元数据指的是**粗体**的部分,插件的元数据指的的是非粗体的部分(如果我没理解错的话)。
   > 
   > So can we develop the existing `syslog` plugin and add configuration to make it support rizhiyi?
   
   因为日志易接收的syslog日志格式和sls比较类似,所以rizhiyi-logger插件的开发参考了sls-logger,它的本质其实也是发送的syslog。如果能开发出来这个功能,直接用syslog插件当然是可以的,不过对我来说可能有点困难。o(╥﹏╥)o 



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017590182


##########
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插件支持定义syslog的元数据格式和内容
   > 
   > we can also set the format of the logs by configuring the Plugin metadata , ref: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/sls-logger.md#metadata
   > 
   > Even though the syslog documentation doesn't say so, it should be supported and used the same way. You can help to verify it.
   
   插件的元数据貌似指的是syslog中%msg%的格式,而不是syslog的元数据。
   
   比如一段syslog日志:**<46>1 2022-11-09T08:15:27.424Z 172.21.48.10 apisix - - [076b9e730462faea7036c04ed314e627@32473 tag="docker,logger"]** {"host":"172.21.48.10","route_id":"17","@timestamp":"2022-11-09T08:15:27+00:00","client_ip":"172.21.48.10"}
   
   我说的元数据指的是**粗体**的部分,插件的元数据指的的是非粗体的部分(如果我没理解错的话)。
   



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] moonming commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
moonming commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1053902224


##########
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://github.com/apache/apisix/pull/8279 already merged.



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] mcy567 commented on a diff in pull request #8265: feat: add rizhiyi logger

Posted by GitBox <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1054142300


##########
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:
   > Great. @mcy567 do you have time to continue this plugin?
   
   开发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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add rizhiyi logger [apisix]

Posted by "mcy567 (via GitHub)" <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1017590182


##########
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插件支持定义syslog的元数据格式和内容
   > 
   > we can also set the format of the logs by configuring the Plugin metadata , ref: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/sls-logger.md#metadata
   > 
   > Even though the syslog documentation doesn't say so, it should be supported and used the same way. You can help to verify it.
   
   插件的元数据貌似指的是syslog中%msg%的格式,而不是syslog的元数据。
   
   比如一段syslog日志:**<46>1 2022-11-09T08:15:27.424Z 172.21.48.10 apisix - - [076b9e730462faea7036c04ed314e627@32473 tag="docker,logger"]** {"host":"172.21.48.10","route_id":"17","@timestamp":"2022-11-09T08:15:27+00:00","client_ip":"172.21.48.10"}
   
   我说的元数据指的是**粗体**的部分,插件的元数据指的的是非粗体的部分(如果我没理解错的话)。
   



-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add rizhiyi logger [apisix]

Posted by "mcy567 (via GitHub)" <gi...@apache.org>.
mcy567 commented on code in PR #8265:
URL: https://github.com/apache/apisix/pull/8265#discussion_r1054142300


##########
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:
   > Great. @mcy567 do you have time to continue this plugin?
   
   开发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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org