[PATCH] newsyslog - don't compress first log file

David Wolfskill david at catwhisker.org
Fri Aug 10 09:47:33 PDT 2007


On Fri, Aug 10, 2007 at 02:19:55PM +0300, Artis Caune wrote:
> How about aditional flag ("X") to newsyslog, which don't compress first 
> log file?
>...

Interesting idea, but it still falls short of something we recently
needed to do at work:

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.

I didn't see a better way to do it, so I cobbled up a Perl script; I'd
much rather be able to use newsyslog(8) for the job.

Biggest problem I can see (with what I want to accomplish) is how to
specify it in the config file.

Peace,
david
-- 
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
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070810/a968333f/attachment.pgp


More information about the freebsd-hackers mailing list