Craig,
I''ve yet to try this, but it looks like a sweet one line solution:
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)
from http://www.bigbold.com/snippets/posts/show/979
--
Scott Becker
Web Developer
Electro Interactive
http://www.ElectroInteractive.com
Blog: http://synthesis.sbecker.net
On 4/21/06, Craig White <craigwhite@azapple.com>
wrote:> I don''t see anything on wiki.rubyonrails.org or in rubyforge that
> handles logs but I am looking to perhaps tarball/compress each
day''s log
> and save it/rotate it which I may be able to get done from logrotate on
> the Linux system but I would have thought that there would be a ruby
> way. I only see ''rake log:clear'' in rake --tasks.
>
> Anyone have suggestions?
>
> Thanks
>
> Craig
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>