[syslog-ng] Logrotate signal instead of HUP
Jonas Eriksson
zqad at hpc2n.umu.se
Fri Aug 8 21:00:09 CEST 2008
Hello
The thing that i miss the most in modern syslog daemons is the
ability to only release the local files without also releasing
sockets for syslog servers.
I also saw that this was mentioned earlier on this list[1] but no
one seems to have written the patches for this until now.
I have however created patches for this, that may be found at
[2]. There are however one problem:
In order to figure out which LogPipes that should be closed is
now done by comparing logdriver->super.init with the
affile_dd_init-function pointer. If it's a match, the LogDriver
is a AFFileDestDriver.
A more elegant solution could be to require some larger changes.
My suggestion is to include a gboolean "logrotate_release" in the
LogDriver, or similar. I have not done any of this, since this
would be best to discuss first.
I am also not sure what to do with write_hash in
AFFileDestDriver. Should these be reinited as well? If that is
the case, i can write the patch required for that as well.
I have spent alot of time reading the code and trying to make the
patch fit in with the style of the rest of the code. I hope I
succeeded at this.
I also have a git repos with the changes available at [3] and
patches for the Ubuntu syslog-ng packages for 6.06 (dapper) and
7.04 (hardy) if it's of interest to anyone.
I have been testing these patches by throwing alot of both USR1
and HUP signals on the running deamon and it seems to behave very
well. I'm thinking about rolling them out in production next
week. Your opinions are welcome.
With regards,
Jonas, HPC2N
[1] https://lists.balabit.hu/pipermail/syslog-ng/2002-November/004063.html
[2] http://www.acc.umu.se/~zqad/syslog-ng-2.0-git.diff
[3] /afs/hpc2n.umu.se/home/z/zqad/Public/repos/syslog-ng-2.0/
-------------------------------------
- Jonas Eriksson, zqad at hpc2n.umu.se -
- sysadmin @ {acc,hpc2n}.umu.se -
-------------------------------------
More information about the syslog-ng
mailing list