PM2 set logs to compress and expire

Referring to the github

pm2 install pm2-logrotate
pm2 set pm2-logrotate:compress true
pm2 set pm2-logrotate:max_size 10M
pm2 set pm2-logrotate:retain 7

nJoy 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.