zlog(3)
=======

NAME
----
zlog - logging class

SYNOPSIS
--------
----
//  Constructor; the sender name is prepended to every message, and may
//  not be null.
CZMQ_EXPORT zlog_t *
    zlog_new (const char *sender);

//  Destructor
CZMQ_EXPORT void
    zlog_destroy (zlog_t **self_p);

//  Set foreground logging on/off. By default, this is off on systems that
//  can do background logging using syslog, and on for systems without syslog
//  support.
CZMQ_EXPORT void
    zlog_set_foreground (zlog_t *self, bool foreground);
    
//  Log error condition - highest priority
CZMQ_EXPORT void
    zlog_error (zlog_t *self, const char *format, ...);

//  Log warning condition - high priority
CZMQ_EXPORT void
    zlog_warning (zlog_t *self, const char *format, ...);

//  Log normal, but significant, condition - normal priority
CZMQ_EXPORT void
    zlog_notice (zlog_t *self, const char *format, ...);

//  Log informational message - low priority
CZMQ_EXPORT void
    zlog_info (zlog_t *self, const char *format, ...);

//  Log debug-level message - lowest priority
CZMQ_EXPORT void
    zlog_debug (zlog_t *self, const char *format, ...);

//  Self test of this class
CZMQ_EXPORT int
    zlog_test (bool verbose);
----

DESCRIPTION
-----------

Wraps the syslog API in a portable framework. On platforms without
syslog, sends output to the console. 


EXAMPLE
-------
.From zlog_test method
----
    zlog_t *log = zlog_new ("zlog_test");
    assert (log);
    zlog_error   (log, "%s", "My pizza was stolen!");
    zlog_warning (log, "%s", "My pizza is late :(");
    zlog_notice  (log, "%s", "My pizza arrived on time");
    zlog_info    (log, "%s", "My pizza smells great!");
    zlog_debug   (log, "%s", "My pizza is round and flat");
    if (verbose) {
        zlog_set_foreground (log, true);
        zlog_notice (log, "%s", "My pizza arrived on time");
    }
    zlog_destroy (&log);
----

SEE ALSO
--------
linkczmq:czmq[7]
