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 2021/12/20 03:45:58 UTC

[GitHub] [apisix] tzssangglass commented on a change in pull request #5840: fix(core.log): log level need to be updated in some scenario

tzssangglass commented on a change in pull request #5840:
URL: https://github.com/apache/apisix/pull/5840#discussion_r772063743



##########
File path: apisix/core/log.lua
##########
@@ -99,7 +102,10 @@ setmetatable(_M, {__index = function(self, cmd)
 
     -- cache the lazily generated method in our
     -- module table
-    _M[cmd] = method
+    if ngx.get_phase() ~= "init" then

Review comment:
       we can add `local get_phase = ngx.get_phase` at header of file, and use `get_phase()`




-- 
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-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org