Thursday, 1 June 2017

PM2 Logrotate keeps generating new logs

I have following settings set for PM2 Logrotate:

rotateInterval= * * 23 * * *

max_size= 100MB

I want to rotate the logs every 23 hours and/or keep max 100MB log files. But for some odd reason, the PM2 Logrotate keeps rotating / creating new log files way too often so I loose the ability to see the history of the logs, i. e "pm2 logs --lines 300" only displays that a new log has been created. This is the output I see in the terminal:

pm2-logrotate > "/root/.pm2/logs/scraper-init-out-1__2017-06-01_08-00-25.log" has been created

pm2-logrotate > "/root/.pm2/logs/pm2-logrotate-out-2__2017-06-01_08-00-25.log" has been created

pm2-logrotate > "/root/.pm2/logs/pm2-logrotate-out-2__2017-06-01_08-00-55.log" has been created

pm2-logrotate > "/root/.pm2/logs/pm2-logrotate-out-2__2017-06-01_08-01-25.log" has been created

What am I doing wrong here?



via Almir

No comments:

Post a Comment