Closed matianhe3 closed 2 years ago
The set_filter_level
API used in the init_by_lua*
init phase.
https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/errlog.md#set_filter_level
This ok? also can't work.
http {
lua_capture_error_log 100k;
init_by_lua_block {
local errlog = require "ngx.errlog"
local status, err = errlog.set_filter_level(ngx.WARN)
if not status then
ngx.log(ngx.ERR, err)
return
end
ngx.log(ngx.WARN, "set error filter level: WARN")
ngx.log(ngx.ERR, "set error filter level: ERR")
}
}
stream {
.....
}
you should change the error log level in nginx.conf errlog.set_filter_level set the filter for the ringbuf of the error log which should be get by errlog.get_logs
you should change the error log level in nginx.conf errlog.set_filter_level set the filter for the ringbuf of the error log which should be get by errlog.get_logs
it's right, thanks.
It only shows the "ERR".