New answers tagged

0

it's because of the short application name 'app' with only 3 characters. somehow the old log deletion script of pm2-logrotate would behave weirdly when the log filename is too short. just delete it from pm2 and start it again with a longer app name then it should be fine. (renaming the app probably would not work because the log filename would still remain ...


0

For future readers, this line is in the logrotate.conf(5) docs: Please use wildcards with caution. If you specify *, logrotate will rotate all files, including previously rotated ones. A way around this is to use the olddir directive or a more exact wildcard (such as *.log)


0

If anyone else stumbles across this it should be noted that logrotate supports a few scripts at various points as defined in the man pages. man logrotate Instead of using 'postrotate' option you can replace it with 'lastaction': lastaction/endscript The lines between lastaction and endscript (both of which must appear on lines by themselves) are executed (...


Top 50 recent answers are included