SIGXXX logrotate patch suggestion.
This is allied to my previous request a few weeks ago that syslog-ng doesn't close and re-open listener sockets across a SIGHUP/reconfigure - all in a desire to drop as few messages as possible across the overnight log rotation. How's about another variation on the same theme, namely to provide a separate signal for rotating logs, in a similar manner to Squid which has separate signals for daemon reconfiguration and log rotation. The action of the new signal would merely be to close all existing output descriptors, and re-open them with the same parameters. This would allow overnight logrotate commands to rename logs before SIGXXX'ing syslog-ng and thus achieve log rotation without requiring listener's are closed/re-opened across the logrotate. Whether or not this is particulary easy given the current layout of the output file objects, I'm afraid I don't know, but it feels to me as though this might be easier to code than the reworking of SIGHUP to preserve listeners across a reconfigure. Any takers? Ted ************************************************************************************************ ************************************************************************************************ WATCH THE LATEST SERIES OF WILL AND GRACE EVERY WEDNESDAY AT 8PM, FROM NOVEMBER 13TH ONLY ON LIVING TV - RESPONSIBLE OWNERS OF WILL AND GRACE. ************************************************************************************************ ************************************************************************************************ This E-mail message, including any attachments, is intended only for the person or entity to which it is addressed, and may contain confidential information. If you are not the intended recipient, any review, retransmission, disclosure, copying, modification or other use of this E-mail message or attachments is strictly forbidden. If you have received this E-mail message in error, please contact the author and delete the message and any attachments from your computer. You are also advised that the views and opinions expressed in this E-mail message and any attachments are the author's own, and may not reflect the views and opinions of FLEXTECH Television Limited. ************************************************************************************************
hi, yes, it is indeed easier. I'll check what I can do in the matter. an USR1 signal should be ok I guess. On Mon, Nov 04, 2002 at 10:22:13AM +0000, Ted_Rule@flextech.co.uk wrote:
How's about another variation on the same theme, namely to provide a separate signal for rotating logs, in a similar manner to Squid which has separate signals for daemon reconfiguration and log rotation.
The action of the new signal would merely be to close all existing output descriptors, and re-open them with the same parameters.
-- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (2)
-
Balazs Scheidler
-
Ted_Rule@flextech.co.uk