[syslog-ng]Re: Logrotate "remove_if_older" documentation

Balazs Scheidler bazsi@balabit.hu
Wed, 13 Feb 2002 09:37:23 +0100

On Wed, Feb 13, 2002 at 09:07:12AM +0100, klaas.vangend@philips.com wrote:
> > I read something about a "remove_if_older" Config variable in Baszis 1.5.14
> > announce, but couldn't find any documentation for it. In which context do i
> > have to use this function (destination i guess..) and which options does it
> > accept/need?
> > Is there also a function which compresses the "rotated-away" logfiles, or
> > do i have to use the "find -mtime" hack?
> I added documentation in the patch I sent.

which I added to the tarball under doc/sgml/syslog-ng.sgml

> Yes, remove_if_older requires one parameters, stating the number of seconds (it was days in my patch,
> but Balazs changed that to seconds to match all other syslog-ng parameters).
> If the file where the log line is to be written to is older than the number of seconds
> specified, the file will be removed prior to writing the log to file. Thus it is a parameter of the file() destination.
> I originally though about implementing some other features, like the ones you described, but because
> our product (which uses syslog-ng as logger) doesn't need those features, my boss didn't allow me to
> work on those. It shouldn't be too complex to add, by the way.
> You can take my patch as a basis for knowing where to change the source code.

I would like to add too many extra features not strictly connected to
logging to the base distribution unless I'm convinced :), which is certainly
possible. The patch Klaas sent was small and clean therefore I applied it.
gzipping old files would mean lookup up a directory listing, find the
matching files, and gzip them... not too clean. An option which writes
directly to a gzipped stream would be ok (and combining the two would result
in something that you want)

PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1