[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Put date on log file names?



On Mon, 17 May 2010 13:59:02 -0400, vr wrote:

> Due to message volume, I'm considering rotating my mail logs daily at my
> local time "midnight" and retaining about 30 days worth of files on
> disk. I'd like to have the date in the file names so visually I'll know
> what span is in each file.
> 
> Can this be done? (put dates into the file name)

Sure, I do :-)

man logrotate → dateext

> Should this be done? (put the date into the file name)

Sure, I do in my "fetchmail" logs :-)
 
> If you're doing something like this already, how did you do it?

By defining "dateext" variable info the "logrotate" script.

***
dateext
Archive  old  versions  of  log  files  adding a daily extension like
YYYYMMDD instead of simply adding a number.
***

Greetings,

-- 
Camaleón


Reply to: