Skip to content

Instantly share code, notes, and snippets.

@chrisyour
Created September 9, 2013 21:47
Show Gist options
  • Save chrisyour/6501981 to your computer and use it in GitHub Desktop.
Save chrisyour/6501981 to your computer and use it in GitHub Desktop.
Limit the size of your development.log and test.log files in your Rails 4 and Rails 3 apps.
# Add this to config/environments/development.rb
# Limit your development log file to 5 MB
config.logger = Logger.new(config.paths["log"].first, 1, 5242880) # 5 megabytes
# Add this to config/environments/development.rb
# Limit your test log file to 5 MB
config.logger = Logger.new(config.paths["log"].first, 1, 5242880) # 5 megabytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment