rogerc / file-stream-rotator

NodeJS file stream rotator
MIT License
143 stars 69 forks source link

Active file name shoudn't contain the date #77

Closed panbhatt closed 2 years ago

panbhatt commented 3 years ago

WE have a requirement where we are using winston-daily-rotate-file and internally it is using this project. However all the log files (even the current one) is being created with the DATE appended to it (that means the file name is not constant). This is creating problems for the log aggregator that takes the data from the current log file.

we need to provide an option where we can do it. I have done some changes in this and it seems to be working ok after the changes, so just wanted to know if we can submit a PR here. once it is done here, we can pass extra options via WINSTON-DAILY-ROTATE-FILE and it will all ok.

mattberther commented 3 years ago

Since this is related to winston-daily-rotate-file, I'll answer here, although it may be better for this issue to be tracked over there.

Anyways, winston-daily-rotate-file has options to support exactly this scenario documented in the README.md. You're probably looking for one or both of the following options:

drmarkfernie commented 3 years ago

We have encountered exactly the same issue. I have created a PR with our fix for the problem. https://github.com/rogerc/file-stream-rotator/pull/80

rogerc commented 2 years ago

version 0.6.0 allows for the option to not have dates in the filename.