Open andrejs82git opened 2 years ago
Hi!
I was try to use pm2-logrotate with that params
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.
w+
a+
Thanks a lot!
Hi!
I was try to use pm2-logrotate with that params
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.
just change
w+
toa+
, i think it will logical. It will append one more portion of log file and not dangerous to delete useful information.Thanks a lot!