keymetrics / pm2-logrotate

Automatically rotate all applications logs managed by PM2
1.24k stars 138 forks source link

Log files are created and deleted instantly #167

Open zerefdev opened 3 years ago

zerefdev commented 3 years ago

Hello, I noticed that there is no log files saved since jan 01. And tonight I saw this:

logrotate

I am using default config

mattjneuber commented 1 year ago

I know this is a very, very old post, but I came here because I'm having exactly the same problem. Did you ever figure it out?

zerefdev commented 1 year ago

I ended up using logrotate Example: /etc/logrotate.d/app

/path-to-log-file
/path-to-another-log-file
{
  daily
  rotate 30
  missingok
  notifempty
  copytruncate # very important when using pm2
  compress
}
tyl1996 commented 8 months ago

Having same issue image image

Currently trying to increase retain value