From: Eric Hodel Date: 2009-05-06T07:58:49+09:00 Subject: Re: my logroll code, please critique On May 5, 2009, at 15:44, Derek Smith wrote: > Tim Pease wrote: >> On Tue, May 5, 2009 at 2:55 AM, Tom Cloyd >> wrote: >>> backchannel it, if you wish). I could definitely USE this! >>> >> >> Take a look at the "logging" gem. The RollingFile appender will do >> exactly this -- rolling files based on size or age. Moreover, it will >> safely roll the files even if multiple processes are writing to the >> same file. >> >> rubyforge.org/projects/logging >> >> Blessings, >> TwP > > I did look into this gem, but the documentation was weak and I tried > to > work it, but could not and failed so I wrote my own since I am new to > Ruby. A good learning exp!....yucky Perl, ugly code is not for me! > > Will anyone share good sample code for logging? > Thanks to all that replied, but Matt will you show me this loop you > referred to? I use SyslogLogger (which adapts Syslog to a Logger API) and newsyslog to rotate logs.