rogerc / file-stream-rotator

NodeJS file stream rotator
MIT License
142 stars 68 forks source link

fix don't emitting first "logRemoved" event #88

Open DenkevichOleg opened 2 years ago

DenkevichOleg commented 2 years ago

fix don't emitting event about deleting oldest file which should be emitted each time when server restarting (https://github.com/winstonjs/winston-daily-rotate-file/issues/296 issue) reason in double emitting "new" event when app started, and first emit happens before stream returning and no one can hear "logRemoved" event

waynewaynetsai commented 2 years ago

Same issue here! We need this PR.

rogerc commented 1 year ago

Hi @DenkevichOleg

I've rewritten the library in Typescript. I think this is not an issue anymore as the order of events is slightly cleaner now. The new version will be released in 7 days or so. Link below.

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