Akayeshmantha commented on issue #1414: Add sys logger.
URL: https://github.com/apache/incubator-apisix/pull/1414#issuecomment-610841647
 
 
   Yeah I think it will be ok if we have a new socket connection open like 
below ?
   
           location /m {
               log_by_lua '
                   local logger_socket = require "resty.logger.socket"
                   local logger = logger_socket:new()
                   if not logger:initted() then
                       local ok, err = logger:init{
                           host = 'xxx',
                           port = 1234,
                           flush_limit = 1234,
                           drop_limit = 5678,
                       }
                       if not ok then
                           ngx.log(ngx.ERR, "failed to initialize the logger: ",
                                   err)
                           return
                       end
                   end
   
                   local bytes, err = logger:log(msg)
                   if err then
                       ngx.log(ngx.ERR, "failed to log message: ", err)
                       return
                   end
               ';
           }`
   `

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to