Jan Stanik wrote:

> Hi,
> 
>       I need to start new log file for qmail every day.I use cyclog, but 
> there I can set log file size only. Is it possible rotate logs every day?

One of my planned hacks is to modify the logging code so that it obtains
the time stamp (I guess it probably already does, anyway) and derives the
log file name from that according to a configureable pattern.  Then if the
name does not match the name currently open for, the new name is opened
and the old name is closed, and the current log message is recorded to the
new log file.

I will also have it track log file size and if certain size thresholds
are reached, the pattern used to generate log file names will change,
such as switching from daily log file name formats to hourly.

I will also have a means to configure a program/script to be launched when
a log file is closed, passing the name of the closed file.  Such a script
could then do things like compress and archive that log file.

-- 
Phil Howard | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
  phil      | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
      at    | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
  ipal      | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
     dot    | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
  net       | [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

Reply via email to