xLog
High performance concurrent multi-target logging library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
xLog: High performance, concurrent, multi-target logging library

xLog provides a convenient means to log application activity and events, to multiple simultaneous targets (syslog, file, predefined stream). Log entries can be prepended with a nanosecond-precision timestamp, and the familiar syslog priority system is utilized for all targets, even if syslog itself is not included. An xlog_session_t session handle represents a particular set of output targets and can be allocated in any quantity needed by an application (eg. to log multiple types of events to different files). Session handles can be freely shared between application threads, each of which will be automatically given its own context (message buffers, message label assignments, etc) in thread-local storage. Xlog has been tested with high-volume output from hundreds of application threads, employing its own background thread to deal with output to the selected targets, allowing minimal impact on application thread execution time.

xLog was originally copied from from scslog with the intent of allowing separate outputs (sessions). This altered the API sufficiently to motivate the development of a new library.