Overview

ServerKit supplies a logging interface similar to the syslog() libc interface. In ServerKit the logged messages are placed on a queue and there is a single logging thread which consumes the messages from the queue and either calls the libc syslog() or sends them directly over a UDP socket in a syslog-compatible format. The latter is more efficient especially when you are in a large scale environment that you remotely log everyting in anyways, theres no point in adding IPC overhead just so your syslogd can send the message over the UDP socket.

Another reason for adding the UDP option is syslog() in some Linux distributions manipulates the process' signal mask. When you do this with large numbers of threads, it is very expensive (at least with the current kernels...). Some distributions have fixed this problem in libc by adding the MSG_NOSIGNAL to the flags on the send to /dev/log, rather than setting SIGPIPE to ignore upon syslog() entry and restoring it on exit, which is what other distributions' libc do.



2007-12-06