Skip to content

fix(log): rotate the log file that is actually written - #66114

Open
lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-65593-log-rotate-fallback
Open

lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-65593-log-rotate-fallback

Conversation

@lazerg

@lazerg lazerg commented Oct 31, 2026

Copy link
Copy Markdown

Summary

When the directory of the configured logfile doesn't exist, File falls back to <datadirectory>/nextcloud.log, but the Rotate job still checked the configured path, so the fallback log was never rotated. Rotate now asks the log factory for the file writer and rotates whatever path it actually writes to. Added a unit test for the fallback case.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: lazerg <lazerg2@gmail.com>
@lazerg
lazerg requested a review from a team as a code owner October 31, 2026 08:09
@lazerg
lazerg requested review from Altahrim, icewind1991, leftybournes and salmart-dev and removed request for a team October 31, 2026 08:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Log rotation never happens when the directory of 'logfile' does not exist (silent fallback to <datadirectory>/nextcloud.log)

1 participant