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 will write to the old file if it's been deleted #504

Closed
cheolgook opened this issue Dec 2, 2014 · 1 comment
Closed

Comments

@cheolgook
Copy link

We're using DailyRotateFile transport and also have separate log archiving box. So after a few days, we move all the log files from app boxes to archive server to free up some space on app boxes, and here comes the problem.

So we have log files with very low traffic (like severe errors) that would have only couple of log entries per week, and the node.js app is running for months without restarting.

The app logged something to the file "20141125.log" which is a week ago, and the app is still running, that file "20141125.log" is already moved to the archive days ago, but the app is still pointing to that file. And today, the app is trying to log something more, and it'll write that log message to the old file "20141125.log" rather than "20141202.log". So it actually creates a file named "20141125.log" again and writes log entry in there.

@indexzero
Copy link
Member

The DailyRotateFile transport was moved to a separate module (winston-daily-rotate-file) as of winston@2.0.0. As such we are closing issues here and tracking their status in a single tracking issue in the new repository.

Please open a new issue on winston-daily-rotate-file to continue the discussion.

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

2 participants