Forum: Ruby Logger - daliy bckup option available?

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.
1096faf8225c7d50fcae3db9f49810d4?d=identicon&s=25 Muruga Raj (murugaraj_82)
on 2008-12-15 12:05
Hello ,

I would like to know is there any option to backup the log file hourly ?

In the Logger class i found only the following options
  logger = Logger.new('foo.log', 'daily')
  logger = Logger.new('foo.log', 'weekly')
  logger = Logger.new('foo.log', 'monthly')

Is there any way to do backup - 'hourly' ?

Thanks in advance
4d5b5dd4e263d780a5dfe7ac8b8ac98c?d=identicon&s=25 Tim Pease (Guest)
on 2008-12-15 17:38
(Received via mailing list)
On Dec 15, 2008, at 3:57 AM, Muruga Raj wrote:

> Is there any way to do backup - 'hourly' ?
>

You'll need to use one of the rolling log files from the two ruby
logging gems -- Logging or Log4r. Both support defining your own
rolling log file interval, and both are based on the same design as
Java's Log4j.

Log4r is no longer being maintained, but it has better documentation.
However, you can always e-mail the author of the Logging gem and he'll
answer questions pretty quickly.

   sudo gem install log4r
   sudo gem install logging


Blessings,
TwP
1096faf8225c7d50fcae3db9f49810d4?d=identicon&s=25 Muruga Raj (murugaraj_82)
on 2008-12-17 05:44
Tim Pease wrote:
> On Dec 15, 2008, at 3:57 AM, Muruga Raj wrote:
>
>> Is there any way to do backup - 'hourly' ?
>>
>
> You'll need to use one of the rolling log files from the two ruby
> logging gems -- Logging or Log4r. Both support defining your own
> rolling log file interval, and both are based on the same design as
> Java's Log4j.
>
> Log4r is no longer being maintained, but it has better documentation.
> However, you can always e-mail the author of the Logging gem and he'll
> answer questions pretty quickly.
>
>    sudo gem install log4r
>    sudo gem install logging
>
>
> Blessings,
> TwP

Thank You so much for your help Tim
I installed logging gem and was able to do rolling hourly
This topic is locked and can not be replied to.