Closed JoyChou93 closed 6 years ago
ngx.log
is fine, it's the standard way of logging. Do not use iopen
to write files from Lua code as it will block current Nginx worker process and cause performance issue. socket
is also good if you have a service that collects logs remotely. Otherwise, just use ngx.log
.
@calio But ngx.log
has a limit of 2048 bytes. https://github.com/openresty/lua-nginx-module#ngxlog
@JoyChou93 no matter which way to choose, there is always some kind of limit. If you know 2048 bytes limit is a problem, then switch to other ways.
we can use
so, which one or other way is the best ?