# Logger - daliy bckup option available?

**URL:** <https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661>\
**Category:** Ruby\
**Created:** [December 15, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661 "2008-12-15T12:05:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![murraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@murraj](https://www.ruby-forum.com/u/murraj)\
**Post date:** [December 15, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661/1 "2008-12-15T12:05:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![murraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@murraj](https://www.ruby-forum.com/u/murraj)\
**Post date:** [December 15, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661/2 "2008-12-15T17:38:23Z")

</div>

On Dec 15, 2008, at 3:57 AM, Muruga R. 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

---

<div class="post-metadata">

**Author:** ![murraj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@murraj](https://www.ruby-forum.com/u/murraj)\
**Post date:** [December 17, 2008, 5:44am UTC](https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661/3 "2008-12-17T05:44:29Z")

</div>

Tim P. wrote:

> On Dec 15, 2008, at 3:57 AM, Muruga R. 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
