Skip to content

Instantly share code, notes, and snippets.

@twmills
Created August 29, 2010 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twmills/556558 to your computer and use it in GitHub Desktop.
Save twmills/556558 to your computer and use it in GitHub Desktop.
# Rotate log files (50 files max at 1MB each)
log_path = '#{Rails.root}/log/#{Rails.env}.log'
# Alter the application file with new configs
gsub_file 'config/application.rb', /# Custom directories with classes and modules you want to be autoloadable./ , %{
config.logger = Logger.new(\"#{log_path}\", 50, 1048576)
config.autoload_paths += %W(\#{config.root}/lib)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment