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.
Derek S. (Guest)
on 2009-04-10 18: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!
Tim P. (Guest)
on 2009-04-10 18:56
(Received via mailing list)
On Apr 10, 2009, at 8:46 AM, Derek S. 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
Jarmo P. (Guest)
on 2009-04-12 16: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 S. 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.