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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to