[syslog-ng] Logs rotate and compress but still log to compressed file

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue May 17 18:29:27 CEST 2005

On Tue, 17 May 2005 08:39:36 EDT, "Rechtorik, Keith" said:
> I am running SUSE 9.1 and I have syslog-ng logging information from our PIX.
> After a rotate is done the file is compressed and rotated but syslog-ng
> keeps logging to the compressed file instead of the newly created file. Any
> help would be greatly appreciated. Here are my conifgs. If you need anymore
> information I will gladly send it.

> /var/log/pix/voclog {
>     rotate 4
>     daily
>     compress
>     delaycompress
> postrotate
> #    kill -HUP `cat /var/run/syslog-ng.pid`
> #     /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null
> ||true

Umm.. does it work if you take those '#' comment chars out?  Remember, whatever
is between 'postrotate' and 'endscript' gets fed to /bin/sh essentially as is.
And without the kill -HUP, syslog won't close and re-open the FD, so it keeps
appending to the now-compressed file....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 226 bytes
Desc: not available
Url : http://www.test.balabit.hu/pipermail/syslog-ng/attachments/20050517/b4b04102/attachment.pgp

More information about the syslog-ng mailing list