[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Logger - daliy bckup option available?

Muruga Raj

12/15/2008 10:58:00 AM

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
--
Posted via http://www.ruby-....

2 Answers

Tim Pease

12/15/2008 4:30:00 PM

0

On Dec 15, 2008, at 3:57 AM, Muruga Raj wrote:

> 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' ?
>

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


Muruga Raj

12/17/2008 4:37:00 AM

0

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
--
Posted via http://www.ruby-....