spacewander commented on a change in pull request #5840:
URL: https://github.com/apache/apisix/pull/5840#discussion_r771102522
##########
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 log_level_update()
Review comment:
```suggestion
local function update_log_level()
```
would be better?
##########
File path: apisix/core/log.lua
##########
@@ -74,8 +85,9 @@ end
setmetatable(_M, {__index = function(self, cmd)
local log_level = log_levels[cmd]
-
local method
+ log_level_update()
+
Review comment:
There is an issue: if we call the log.xxx in the init phase, we will
always generate the method and affect the later phases.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]