Skip to content

Instantly share code, notes, and snippets.

@tomasinouk
Last active August 29, 2015 14:21
Show Gist options
  • Save tomasinouk/1c59a99c82ed8df7c3f5 to your computer and use it in GitHub Desktop.
Save tomasinouk/1c59a99c82ed8df7c3f5 to your computer and use it in GitHub Desktop.
logrotate and pm2 logs
# logrotate and pm2 logs
# file location
# /etc/logrotate.d/pm2
/root/.pm2/logs/*.log {
daily
rotate 15
missingok
notifempty
sharedscripts
dateext
dateformat %Y-%m-%d
postrotate
pm2 reloadLogs
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment