Open
Description
Hi!
I was try to use pm2-logrotate with that params
- rotateInterval = * * * * * (rotate every minute)
- dateFormat=YYYY-MM-DD (not have minute)
And it work fine, exclude one thing, - every new minutecreating new empty logfile and write new portion from main log file.
I am not familiar with pm2-logrotate code, but i found code that looks like can fixing that befavior.
--var writeStream = fs.createWriteStream(final_name, {'flags': 'w+'});
++var writeStream = fs.createWriteStream(final_name, {'flags': 'a+'});
just change w+
to a+
, i think it will logical. It will append one more portion of log file and not dangerous to delete useful information.
Thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels