Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

How to rotate your Rails logs by size, so you can allocate a certain amount of space for it. (See related posts)

Add this to RAILS_ROOT/config/environment.rb to keep 50 logfiles of 1MB each.
config.logger = Logger.new("#{RAILS_ROOT}/log/#{ENV['RAILS_ENV']}.log", 50, 1048576)

You need to create an account or log in to post comments to this site.


Click here to browse all 5147 code snippets

Related Posts