DZone 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

Snippets has posted 5883 posts at DZone. View Full User Profile

How To Rotate Your Rails Logs By Size, So You Can Allocate A Certain Amount Of Space For It.

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