Re: Logrotate "remove_if_older" documentation
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. 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. Groetjes, Klaas van Gend
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) -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
On Wed, Feb 13, 2002 at 09:37:23AM +0100, Balazs Scheidler wrote:
I would like to add too many extra features not strictly connected to
err... a "not" is missing. that is I wouldn't like to add.
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)
-- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng
-- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
At 09:37 13.02.2002 +0100, you wrote:
On Wed, Feb 13, 2002 at 09:07:12AM +0100, klaas.vangend@philips.com wrote:
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
sorry, my fault, i only checked the documentation on your homepage, which isn't updated yet.
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)
I'm currently using $HOST/$YEAR-$MONTH-$DAY logname-templates, so remove_if_older won't work for me. I'd like something like the "find -mtime" stuff which checks all logfiles (even the unopened ones) and gzip's/rm's them if they're unzipped and not modified for a day/if they're older than a week, but that would be way too complicated and unclean for syslog-ng, so better keep it out. On-the-fly compressed logfiles would be neat, but (at least for me) problematic if there isn't an option to tail them in realtime (is this possible with gzip compressed files?). best regards -- Renner Michael
participants (3)
-
Balazs Scheidler
-
klaas.vangend@philips.com
-
Michael Renner