[syslog-ng] Logrotate signal instead of HUP
Balazs Scheidler
bazsi at balabit.hu
Mon Aug 11 08:48:15 CEST 2008
On Fri, 2008-08-08 at 21:00 +0200, Jonas Eriksson wrote:
> 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.
Thanks for your contribution. I was also thinking about adding this
function, but never got to implement that. So in general I like the
function, I think it is very useful.
After a quick glimpse on the code, I would hesitate to add it directly
though. I hope to get something similar to syslog-ng 3.0.
--
Bazsi
More information about the syslog-ng
mailing list