[syslog-ng]log rotation features for syslog-ng
Gregor Binder
gb@rootnexus.net
Thu, 24 Jan 2002 17:02:35 +0100
klaas.vangend@philips.com on Thu, Jan 24, 2002 at 10:03:59AM +0100:
Hi Klaas,
> I'd to know wheter everyone agrees that these features are a good idea,
> and that the proper approach is taken to
> keep the configurationfile syntax simple.
you can achieve the functionality you are asking for if you use date-
extensions to your files ($YEAR$MONTH$DAY) and run one or two very simple
commands from cron like
find /var/log -mtime +1 -exec gzip -9 {} \;
find /var/log -mtime +7 -exec rm -f {} \;
I have to say that I run an additional script to extract logfile X of
host Y from the log repository, so I don't really have to deal with
those funny filenames anymore. I don't have a problem using cron.
>From your suggestions, the only one that I would agree is required or at
least really good to have, is simple rotation by filesize using numeric
extensions, where one could specify how big a logfile can be and how
many .[0-9]'s backups should be made (the oops proxy server does this
nicely). I would still leave compression and deletion to cron.
Regards,
--
____ ____
/ _/| - > Gregor Binder <gb@(rootnexus.net|sysfive.com)>
| / || _\ \
\__ Id: 0xE2F31C4B Fp: 8B8A 5CE3 B79B FBF1 5518 8871 0EFB AFA3 E2F3 1C4B