-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
DailyRotateFile transport losing rotation count after restart #329
Comments
I have seen the same behavior in the File transport. It is using the exact same code. |
Hmm: for the daily transport I've made a patch, pulled to winston: #333. Tested it until now and seems to work fine. |
Do you know if this was also addressed in the file transport as well? They were both having the same issue (not detecting other files already there). Do you know if that version has been pushed to npm? I did a upgrade to latest winston and I'm not seeing this pull in that version. 0.7.2 is the latest available it appears. |
Be aware that my pull request is about daily transport, not file transport. |
No problem, I figured I'd ask if you or anyone had done the same for File Transport. |
It could happen that the given node process, using winston an daily file transport, gest restarted/crashes and gets pulled up again: in this case the daily file transport isn't able to see the log files generated before the restart, so the log rotation happens lately. More application restarts happen, more abandoned log files remain there.
Personally I think that it's a basic feature to correct the daily transport so this behaviour couldn't happen: for instance at startup it could search, inside the logs folder, for flies with given filename pattern and considers them.
The text was updated successfully, but these errors were encountered: