syslog_async.c File Reference

A non-blocking syslog() replacement. More...

Go to the source code of this file.


Detailed Description

A non-blocking syslog() replacement.

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.c.


Generated on Thu May 24 20:00:44 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6