monkeyDluffy6017 commented on code in PR #9210:
URL: https://github.com/apache/apisix/pull/9210#discussion_r1156810322


##########
apisix/plugins/log-rotate.lua:
##########
@@ -265,6 +265,22 @@ local function rotate_file(files, now_time, max_kept)
     end
 end
 
+local function get_custom_logfile_name()
+    local custom_file_name = core.config.local_conf()
+
+    local new_error_log = core.table.try_read_attr(local_conf, "nginx_config", 
"error_log")
+    local new_access_log = core.table.try_read_attr(local_conf, 
"nginx_config", "http", "access_log")
+
+    if new_access_log then
+        DEFAULT_ACCESS_LOG_FILENAME = new_access_log

Review Comment:
   I think we should not use the `DEFAULT_ACCESS_LOG_FILENAME ` and 
`DEFAULT_ERROR_LOG_FILENAME`, like this
   ```
   local access_log_filename = new_access_log or DEFAULT_ACCESS_LOG_FILENAME 
   ```
   And then use `access_log_filename` instead of `DEFAULT_ACCESS_LOG_FILENAME`



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

Reply via email to