Skip to content

Instantly share code, notes, and snippets.

@nathanclark
Created March 3, 2011 20:23
Show Gist options
  • Select an option

  • Save nathanclark/853460 to your computer and use it in GitHub Desktop.

Select an option

Save nathanclark/853460 to your computer and use it in GitHub Desktop.
Utilities needed for many rails apps
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