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 2020/10/13 13:22:49 UTC

[GitHub] [apisix] membphis opened a new issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

membphis opened a new issue #2410:
URL: https://github.com/apache/apisix/issues/2410


   all of the error log will be written into local files now.
   
   ```
   $ ls logs
   access.log  error.log
   ```
   
   we can implement a new plugin which named `error-log-logger`, it'll collect the error log from API: https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/errlog.md
   
   we can report those error log to `syslog-ng` server or HTTP server.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2410:
URL: https://github.com/apache/apisix/issues/2410#issuecomment-712674971


   yes, that is the right way. ^_^


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] spacewander closed issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #2410:
URL: https://github.com/apache/apisix/issues/2410


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2410:
URL: https://github.com/apache/apisix/issues/2410#issuecomment-711578946


   https://github.com/openresty/lua-nginx-module#lua_capture_error_log
   
   we need to enable this directive first, that is the switch. 
   
   and I think we can call `set_filter_level` in the `init` of plugin. it should be fine.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] dabue commented on issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

Posted by GitBox <gi...@apache.org>.
dabue commented on issue #2410:
URL: https://github.com/apache/apisix/issues/2410#issuecomment-707758875


   I'll have a try.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] dabue commented on issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

Posted by GitBox <gi...@apache.org>.
dabue commented on issue #2410:
URL: https://github.com/apache/apisix/issues/2410#issuecomment-711489292


   @membphis  the plugin will impact all request when it be set, is that ok? and it needs to be initialized during http_init.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] dabue commented on issue #2410: feat: plugin `error-log-logger`, collect error log and report to remote server by `cosocket`

Posted by GitBox <gi...@apache.org>.
dabue commented on issue #2410:
URL: https://github.com/apache/apisix/issues/2410#issuecomment-712670458


   I 'll add a timer which collects error logs and reports  to the server  in the init of plugin when the plugin enabled, because the function is global, not releated the request.
   and I'll add a shared-dict variable which will be changed when enable or disable the plugin to  indicate the timer  exit or not.
   


----------------------------------------------------------------
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:
users@infra.apache.org