root at root at
Thu Apr 26 13:39:58 UTC 2012

On 26/04/2012 15:22, Valentin V. Bartenev wrote:
>  wbr, Valentin V. Bartenev
I saw that patch, and I understand that syslog(3) does block, but since I need
to set one program identifier per vhost, I wouldn't be using syslog(3), but
rather reimplementing it (already done, taken a lot from glib, bsd license).

Using udp connections would make the call non-blocking, and should be safe
enough on localhost.

Then again, other solutions can be found, such as having a dedicated thread send
the message to syslog, so that logging calls are non-blocking.

Or I could write on a fifo buffer/file the messages and have the dedicated
thread send the messages to syslog (date is set on the sent message, not at the
time the message arrives to syslog, so no problem with that).


More information about the nginx mailing list