You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "membphis (via GitHub)" <gi...@apache.org> on 2025/07/03 08:08:36 UTC

Re: [PR] fix(log-rotate): skip access log when enable_access_log is set to false [apisix]

membphis commented on code in PR #11310:
URL: https://github.com/apache/apisix/pull/11310#discussion_r2182141476


##########
apisix/plugins/log-rotate.lua:
##########
@@ -76,7 +77,6 @@ end
 
 
 local function get_log_path_info(file_type)
-    local_conf = core.config.local_conf()

Review Comment:
   and need to update `enable_access_log`, it may change
   
   ```lua
   enable_access_log = core.table.try_read_attr(
           local_conf, "nginx_config", "http", "enable_access_log")



##########
apisix/plugins/log-rotate.lua:
##########
@@ -76,7 +77,6 @@ end
 
 
 local function get_log_path_info(file_type)
-    local_conf = core.config.local_conf()

Review Comment:
   we should keep this line
   
   the `local_conf` may change when APISIX is running



-- 
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