Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 1998 16:40:43 -0700 (MST)
From:      Marc Slemko <marcs@znep.com>
To:        Tom <tom@sdf.com>
Cc:        "Daniel O'Callaghan" <danny@panda.hilink.com.au>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: 2nd call for comments: New option for newsyslog
Message-ID:  <Pine.BSF.3.95.980117163527.1145N-100000@alive.znep.com>
In-Reply-To: <Pine.BSF.3.95q.980116232602.7843A-100000@misery.sdf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Jan 1998, Tom wrote:

> > As for the daily and weekly options, there are always 24 hours in a day
> > and 168 hours in a week, so fixed period rotations are correctly handled. 
> > Or are they?  In fact, rotating every 24 or 168 hours may not be what was
> > wanted, if the sysadmin really wants the files rotated as close as
> > possible to midnight with the week starting on Sunday. 
> 
>   In some cases, accurate midnight rotation is critical.  
> 
> > So maybe what is needed is a flag to newsyslog which tells it to process 
> > daily, weekly and monthly entries, and newsyslog itself can decide 
> > whether today is the first day of the week or month.
> 
>   In which case we can call it cron2
> 
>   newsyslog works well when you need to rotate syslog logs, but if you
> need to do some pre or post processing too (like the login accounting
> problem), you might as well use cron.  You are going to have to create
> lots of shell scripts for all of these pre and post processing jobs
> anyhow, so you might as well let cron process it.
> 
>   I feel uncomfortable for using newsyslog for processing anything other
> than syslog generated logs, especially considering how newsyslog HUPs
> syslog whenever it moves a log file.

You need a generic way of allowing a HUP to be sent to any process, eg. by
specifying the PID file.

You need a way to only gzip the log-before-the-just-rotated one, not the
just-rotated one. This is because some programs don't immediately close
logfiles on HUP, but can take a minute or two.

You need a way to tell it to name files based on date (eg. foo.19980117)
instead of number; by number sucks for incremental backups because they
are moved every day.

You need a way to have it specify hard times instead of every x hours.

You need the ability to add arbitrary pre and post rotation commands.

I find logrotate unusable for real log rotations because of these missing
features, but find it very silly to have to write my own stuff all the
time (or use another package) to do it.  Unfortunately, extra features
don't fit too well with the config file format.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980117163527.1145N-100000>