Skip to content

Instantly share code, notes, and snippets.

@bryanrite
Forked from chrisyour/development.rb
Last active September 22, 2015 11:37
Show Gist options
  • Save bryanrite/0bdd7e5ab92bfa484445 to your computer and use it in GitHub Desktop.
Save bryanrite/0bdd7e5ab92bfa484445 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