|
If Warehouse runs for awhile, you’ll fill up your application’s log over time. Here’s how you can customize it if you want to.
- Open up config/environment.rb
- find line #13, starting with
Rails::Initializer.run do |config|
- underneath that enter this line of code:
config.logger = Logger.new("#{RAILS_ROOT}/log/#{ENV['RAILS_ENV']}.log", 5)
What that does is creates a rotation of five log files with a maximum size of 1MB. You can configure this in several ways:
# rotation of five log files at 5MB each (1024 * 1024 * 5).
config.logger = Logger.new("#{RAILS_ROOT}/log/#{ENV['RAILS_ENV']}.log", 5, 5242880)
# rotate logs daily, weekly, or monthly
config.logger = Logger.new("#{RAILS_ROOT}/log/#{ENV['RAILS_ENV']}.log", 'daily')
I’ll probably set it to something similar by default in Warehouse v1.1.
|