On Dec 23, 2008, at 12:10 AM, Muruga Raj wrote:

> Hi,
>
> I am using the "logging" gem for logging.
> I used the "RollingFile" appender to rotate the log files.
> When the files are rotated they are saved with the sequential number
> extension.
> That is like develeopment.1.log, development.2.log etc.
>
> Is there any way to add the timestamp for the rotated log file name  
> such
> as development_12232008.log etc?

The logging gem does not support this directly. You will need to  
writer your own appender class as Dejan Dimic mentioned in his message.

Take a look at the following sample. It should do what you want, but  
it is thoroughly untested.

<http://gist.github.com/39362>

I recommend using a date format such as YYYY/MM/DD. This allows your  
log files to be sorted chronologically when you list them either in a  
file explorer or from the command line using ls.

Blessings,
TwP