Skip to content

Instantly share code, notes, and snippets.

@facundofarias
Created February 6, 2017 08:33
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 facundofarias/e41281a07c021917676de7028381d635 to your computer and use it in GitHub Desktop.
Save facundofarias/e41281a07c021917676de7028381d635 to your computer and use it in GitHub Desktop.
Configure rotate logs on Rails

To configure Rails to rotate your log files while in the development and test environments, add the following to your development.rb and test.rb files found within /config/environments/

# Rotate logs every day. You can use 'daily', 'weekly' or 'monthly'.
config.logger = Logger.new("#{Rails.root}/log/#{ENV['RAILS_ENV']}.log", 'daily')

Found Here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment