Created
March 3, 2011 20:23
-
-
Save nathanclark/853460 to your computer and use it in GitHub Desktop.
Utilities needed for many rails apps
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
| namespace :utils do | |
| desc "Echos log rotate configs" | |
| task :rotate => :environment do | |
| puts <<EOD | |
| <<<<<<<<<<<<Begin | |
| # Rotate Rails application logs | |
| #{Rails.root}/log/*.log { | |
| daily | |
| missingok | |
| rotate 7 | |
| compress | |
| delaycompress | |
| notifempty | |
| copytruncate | |
| } | |
| <<<<<<<<<<<<End | |
| EOD | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment