Logger - daliy bckup option available?

M

Muruga Raj

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
 
T

Tim Pease

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
 
M

Muruga Raj

Tim said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,274
Latest member
JessMcMast

Latest Threads

Top