-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rotation of log files. #84
base: main
Are you sure you want to change the base?
Conversation
Hi, are you, by any chance, using different file systems for the https://api.flutter.dev/flutter/dart-io/File/rename.html
|
Good point. |
Then, how did you find your fix, just trial-and-error? |
Kindof. I'm sure there are better ways of doing it :-) |
Ah, ok. Did you test your fix, does it reliably fix your problem on Debian? Yeah, I get why somebody would think that, even I had to check again: It is weird as it seems to be working just fine on Windows and Ubuntu (GitHub Actions). |
I did not look deeper into the actual implementation details. But the proposed "fix" does solve the issue on my own system. Please do the proper due diligence before considering this. |
Using
AdvancedFileOutput
on Linux (Debian) I noticed that the rotation of log files did not work as expected.latest.log
did get renamed to whatever the configuration defined, but the logger would keep writing to this file.This would lead to log files far exceeding the size defined with
maxFileSizeKB
.This PR fixes this.