Created
September 23, 2010 13:51
-
-
Save rrrodrigo/593634 to your computer and use it in GitHub Desktop.
Rails production.log rolling using the standard Linux logrotate mechanism
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this into /etc/logrotate.d/app-production | |
# to have a Rails app running on unicorns rotating/rolling its logs monthly | |
# check with logrotate -f /etc/logrotate.d/app-production | |
/web/app/production/shared/log/*.log { | |
monthly | |
missingok | |
rotate 24 | |
compress | |
delaycompress | |
sharedscripts | |
postrotate | |
kill -s HUP `cat /web/app/production/shared/pids/unicorn.pid` | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment