[PATCH] newsyslog - don't compress first log file
david at catwhisker.org
Sun Aug 12 05:41:08 PDT 2007
On Sun, Aug 12, 2007 at 02:24:20PM +0200, Ulrich Spoerlein wrote:
> > We have a requirement to retain some number of logfiles, but only
> > compress those older than the Nth generation.
> > Thus, we might retain 90 "rotated" generations of the log file, of which
> > the oldest 50 are compressed, while the newest 40 are not.
> Sorry, to be so blunt, but I think this .N suffix is a stupid approach
> for archival purposes. You never know which time span is included in the
> file foo.17.gz.
First, no problem with being blunt; it facilitates communication. :-)
That said, we're not keeping the files for particularly long, so
"archival" isn't an issue for us.
It's merely that the files are extremely compressible (compressed size
is about 12% the original), but for various reasons outside the control
of those of us who run the machines, we need to keep some number of the
most recent of them uncompressed.
> I'd rather see an extension for newsyslog which would rotate foo to
> foo.2007-08-12.gz, iff rotation is done every day at midnight.
> That way, you get a 'stable' name, which makes it easier to find the
> logfile for 1999-12-31 or 2000-01-01 some years from now.
And on the other hand, to find the log for 3 days ago, you need to have
a better idea of the current date than I generally do unless I check
(either my watch or `date`). :-} So there are trade-offs. :-}
Then again, I'm rather in the habit of using "ls -ltr ...." when I'm
interested in the more recent of a set of files.
> Right now, I have to use syslog-ng for that purpose.
Well, I certainly wouldn't object to the existence of such a feature,
whether or not I'd use it myself. :-)
David H. Wolfskill david at catwhisker.org
Anything and everything is a (potential) cat toy.
See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070812/e946ac26/attachment.pgp
More information about the freebsd-hackers