Log files are created and deleted instantly
zerefdev opened this issue · 3 comments
zerefdev commented
mattjneuber commented
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
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