Go to the source code of this file.
Syslog_async is a non-blocking replacement for the POSIX-standard syslog() system call. Instead of blocking, log-lines are buffered in memory. The buffer size is limited and if the buffer overflows log lines are lost. When lines are lost this fact is logged with a message of the form:
async_syslog overflow: 5 log entries lost
In order to limit the probability of buffer overflow short delays are added to syslog_async() calls when the queue is getting full. The delay added is strictly bounded and tunable.
The API is very close to the standard syslog(), with an additional call the tune buffer parameters and a couple of calls into the event loop.
The code has been tested under Linux and BSD, and with both the syslog and syslog-ng log daemons.
Definition in file syslog_async.h.
1.5.6