You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "binafor (via GitHub)" <gi...@apache.org> on 2026/09/17 03:15:10 UTC

[PR] fix(log-rotate): remove redundant slash in rotated log file path [apisix]

binafor opened a new pull request, #13960:
URL: https://github.com/apache/apisix/pull/13960

   ### Description
   
   In `log-rotate.lua`, `get_log_path_info` returns `filepath` with a trailing slash (`/`). 
   However, `init_default_logs` concatenates `filepath .. "/%s__" .. filename`, causing redundant double slashes (e.g. `/usr/local/apisix/logs//2026-09-17_00-00-00__access.log`) in the rotated log target path.
   
   This PR removes the redundant slash so the rotated file path stays normalized.
   
   #### Which issue(s) this PR fixes:
   <!-- If there is an issue, write "Fixes #issue_number", otherwise delete this section -->
   
   ### Checklist
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible


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