Forum: Ruby logfile rotate

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F6a3dfee23741adec521eff5fa003aa0?d=identicon&s=25 Derek Smith (derekbsmith)
on 2009-04-10 16:46
Is there a gem that rolls logs for you?  if so how and where can I get
it?  I have started to write my own, but figured I'd ask.

thx!
4d5b5dd4e263d780a5dfe7ac8b8ac98c?d=identicon&s=25 Tim Pease (Guest)
on 2009-04-10 16:56
(Received via mailing list)
On Apr 10, 2009, at 8:46 AM, Derek Smith wrote:

> Is there a gem that rolls logs for you?  if so how and where can I get
> it?  I have started to write my own, but figured I'd ask.
>

Take a look at the "logging" gem. It has a rolling logfile appender --
rotates logfiles after they get (a) too big or (b) too old. If you are
not generating the logfiles from a Ruby app, then that appender is a
good place to steal code from.

Blessings,
TwP
Ff97ca87af59ee68ceff5877a8365788?d=identicon&s=25 Jarmo Pertman (juuser)
on 2009-04-12 14:42
There is also a standard Ruby library called Logger which can do that:
http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/index.html

Derek Smith wrote:
> Is there a gem that rolls logs for you?  if so how and where can I get
> it?  I have started to write my own, but figured I'd ask.
>
> thx!
This topic is locked and can not be replied to.