Created
April 25, 2010 23:53
-
-
Save steveluscher/378839 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/path/to/rails_apps/*/log/*.log { | |
daily | |
missingok | |
rotate 30 | |
compress | |
delaycompress | |
sharedscripts | |
postrotate | |
find /path/to/rails_apps/* -name tmp -maxdepth 1 -type d -exec touch {}/restart.txt \; | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This log rotation configuration works really well for me on a collection of rails apps; it even restarts Passenger for each app involved after rotating the logs. Thanks to http://overstimulate.com/articles/logrotate-rails-passenger for getting me started.