leslie-tsang commented on a change in pull request #5840: URL: https://github.com/apache/apisix/pull/5840#discussion_r772047430
########## File path: apisix/core/log.lua ########## @@ -42,17 +43,27 @@ local log_levels = { } -local cur_level = ngx.config.subsystem == "http" and - require "ngx.errlog" .get_sys_filter_level() +local cur_level + local do_nothing = function() end +local function update_log_level() + -- Nginx use `notice` level in init phase instead of error_log directive config + -- Ref to src/core/ngx_log.c's ngx_log_init + if ngx.get_phase() ~= "init" then + cur_level = ngx.config.subsystem == "http" and ngx_errlog.get_sys_filter_level() Review comment: Shall we remove `ngx.config.subsystem == "http"` ? -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org