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/01/15 11:21:42 UTC

[GitHub] [apisix] bisakhmondal commented on a change in pull request #6113: feat: development of Loggly logging plugin

bisakhmondal commented on a change in pull request #6113:
URL: https://github.com/apache/apisix/pull/6113#discussion_r785298487



##########
File path: apisix/plugins/slslog/rfc5424.lua
##########
@@ -81,7 +81,10 @@ local Severity = {
 local log_util = require("apisix.utils.log-util")
 
 
-local _M = { version = 0.1 }
+local _M = {
+    version = 0.1,
+    severity = Severity

Review comment:
       Hi, thanks for the code review and the concern. The current PR need to access the rfc5424 severity map to decode alert status into integer numbers.
   >    local message = {
           -- facility LOG_USER - random user level message
           "<".. tostring(8 + severity[conf.severity]) .. ">1", -- <PRIVAL>1
           timestamp,                                           -- timestamp
           ctx.var.host or "-",                                 -- hostname
           "apisix",                                            -- appname
           ctx.var.pid,                                         -- proc-id
           "-",                                                 -- msgid
           "[" .. conf.customer_token .. "@41058 " .. tab_concat(taglist, " ") .. "]",
           json_str
       }
   
   I have made the field exported here from that module. Okay, reverting the changes back with a local copy of that severity map inside the plugin. Thank 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