winstonjs / winston-daily-rotate-file

A transport for winston which logs to a rotating file each day.
MIT License
895 stars 155 forks source link

Feature request.(Rotate the logs when app is restarted) #299

Closed edwinclement08 closed 3 years ago

edwinclement08 commented 3 years ago

I think a good feature to have is to rotate the logs when the app is restarted. This can be behind a flag defaulting to false.

This is helpful as it would allow easy debugging of issues that lead to a crash of the server. Right now, need to hunt throw the alert infrastructure to detect failure points, and then find the same point in the logs.

With this option, tailing the previous log will be enough.

mattberther commented 3 years ago

This transport has options to support tailing the log. You're probably looking for one or both of the following options:

Please reopen with additional detail if this is not what you had in mind.