rails_log_autotruncator is a simple patch for ActiveSupport::BufferedLogger that limits a log file size. Use it if you just don't want your rails project development or test log file becomes large.
You don't need this gem if you use ruby 1.9.3, just add the following code to your environment config file:
config.logger = Logger.new(config.paths.log.first, 1, 5.megabytes)
5.megabytes is max log file size in this case. You can adjust it according to your needs.
Ruby 1.9.2 Rails 3.0.6
Ruby 1.8.7 Rails 2.3.5
Add the rails_log_autotruncator to your Gemfile:
gem install rails_log_autotruncator
then write the following to your environment.rb to Rails::Initializer.run block:
config.gem “rails_log_autotruncator”, :lib => “rails_log_autotruncator”
Copyright © 2011 Dmitry Plashchynski. See LICENSE.txt for further details.