[syslog-ng] Unix-stream destination as listen socket

Peter Nahas pnahas at mrv.com
Tue Oct 18 16:46:08 CEST 2005


Hello everyone,

I am currently working on a project using syslog-ng-1.9.5 (soon to 
upgrade to 1.9.6) which requires a syslog-ng destination to be a Unix 
socket.  The problem is that the syslog-ng daemon will always be started 
before the destination application.  So to prevent the loss of messages 
due to the reconnect timer, the syslog-ng destination Unix socket  will 
have to  listen()/accept() for a connection rather than connect() to an 
external socket.  If this enhancement would be used by others, I would 
like to write this properly.  Therefore I have the following questions:
A) If this enhancement were written, would it be accepted into the 
repository?  If not, I will simply hack up the current 
AFUnixDestinationDriver to do what I want. 
B) Is there any specification document which would assist me in making 
this enhancement? 
C) Would this best be done by adding an additional option to unix-stream 
for destinations or by creating a separate destination driver? 
D) It appears as if the AFSocketDestinationDriver is not designed to 
perform listen()/accept(), but the AFSocketSourceDriver is.  Would it be 
possible to set up the AFUnixDestinationDriver to use the 
AFSocketSourceDriver as a parent, but attach it to a log writer?

Thanks in advance,

Peter Nahas
Software Engineer
MRV Communications - InReach division



More information about the syslog-ng mailing list