winstonjs / winston-daily-rotate-file

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

New version of file-stream-rotate [v1] - some breaking changes introduced #361

Open rogerc opened 1 year ago

rogerc commented 1 year ago

Hi @mattberther

I will be releasing a new version [v1.0.0] in a few days. Its rewritten in Typescript. From the tests I've done all seems to work the same as before based on the examples I provided in the readme. However, I've removed moment.js and I am not using any dependencies. For date replacements, I am using the built-in functions which limits the replacements available.

The lines from the readme that highlight the changes are:

frequency: How often to rotate. Options are 'daily' for daily rotation, 'date' based on date_format, '[1-12]h' to rotate every 1-12 hours, '[1-30]m' to rotate every 1-30 minutes. date_format: Use 'Y' for full year, 'M' for month, 'D' for day, 'H' for hour, 'm' for minutes, 's' for seconds If using 'date' frequency, it is used to trigger file change when the string representation changes. It will be used to replace %DATE% in the filename. All replacements are numeric only.

Link to the new version below.

https://github.com/rogerc/file-stream-rotator/tree/v1

Would be great if you could check your end and let me know you find any issues.

Thanks

Roger