flea1lt opened a new issue, #11309:
URL: https://github.com/apache/apisix/issues/11309

   ### Current Behavior
   
   The `log-rotate` plugin rotates the access log regardless of the 
`enable_access_log` setting.
   
   ### Expected Behavior
   
   The `log-rotate` plugin should skip rotating the access log if 
`enable_access_log` is set to false.
   
   ### Error Logs
   
   ```
   2024/05/31 09:41:48 [error] 57#57: *428 [lua] log-rotate.lua:150: 
rename_file(): move file from /usr/local/apisix/logs/access.log to 
/usr/local/apisix/logs//2024-05-31_09-41-48__access.log res:nil 
msg:/usr/local/apisix/logs/access.log: No such file or directory, context: 
ngx.timer
   ```
   
   ### Steps to Reproduce
   
   1. Add the Configuration to config.yaml
   ```
   nginx_config:
     http:
       enable_access_log: false
   
   plugins:
     - log-rotate
   
   plugin_attr:
     log-rotate:
       interval: 1
   ```
   2. Mount config.yaml and run APISIX via the docker image
   2. Check the error log
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.9.0


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