log4js-node / streamroller

node.js file streams that roll over when they reach a maximum size, or a date/time.
MIT License
38 stars 19 forks source link

Update documentation to include daysToKeep option #10

Closed tangshuang closed 7 years ago

tangshuang commented 7 years ago

I find it is easy to use RollingFileStream to keep numBackups files. But how can I keep certain number files when using DateRollingFileStream? The most idealized method is to delete files by passing a certain time range, for example pass a number to keep this number latest days files.

Could log4js support this? Or could you give some advise?

tangshuang commented 7 years ago

After searching source code, I found there is a option daysToKeep to implement this. It's my fault without reading source code.

nomiddlename commented 7 years ago

This isn't your fault - it should be in the documentation. I'm going to keep this issue open, so that I remember to update the docs to include the daysToKeep option.