Skip to content
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

Closed
nicStuff opened this issue Nov 25, 2013 · 6 comments
Closed

DailyRotateFile transport losing rotation count after restart #329

nicStuff opened this issue Nov 25, 2013 · 6 comments

Comments

@nicStuff
Copy link

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.

@jci-fox
Copy link

jci-fox commented Jan 28, 2014

I have seen the same behavior in the File transport. It is using the exact same code.

@nicStuff
Copy link
Author

Hmm: for the daily transport I've made a patch, pulled to winston: #333. Tested it until now and seems to work fine.

@jci-fox
Copy link

jci-fox commented Jan 29, 2014

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.

@nicStuff
Copy link
Author

  1. well, when I pointed out the problem I didn't found any notice from anyone about something similar on File transport (as what I saw I was the first noticing this thing)
  2. My pull request is still there (and it is for daily transport, although something could be eventually extracted and used even with file transport): before seeing it on npm, who has the rights on the repo must accept the pull, then make a release with it (usually it's a long way...). This is why I made my own fix and I'm using it.

Be aware that my pull request is about daily transport, not file transport.

@jci-fox
Copy link

jci-fox commented Jan 30, 2014

No problem, I figured I'd ask if you or anyone had done the same for File Transport.

@indexzero
Copy link
Member

Duplicate of #504. And fixed by #505.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants