Skip to content

Instantly share code, notes, and snippets.

@steveluscher
Created April 25, 2010 23:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save steveluscher/378839 to your computer and use it in GitHub Desktop.
Save steveluscher/378839 to your computer and use it in GitHub Desktop.
/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
}
@steveluscher
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment