Skip to content
Marc Mengel edited this page Feb 13, 2025 · 1 revision

Numsg

The numsg library lets you log messages via syslog to syslog deamons listening for
UDP syslog message packets.

Most users will use it via the ifdh log() method, but there are fancier things if you call numsg directly:

<code lang="cpp">
#include "numsg.h"

...
    numsg::getMsg()->new_state("bar");  
    numsg::getMsg()->start("laundry");
    sleep(2);
    numsg::getMsg()->printf("test %s with %d things", "washer", 25);
    sleep(2);
    numsg::getMsg()->start("dishes");
    sleep(2);
    numsg::getMsg()->finish("dishes");
    sleep(2);
    numsg::getMsg()->finish("laundry");
    numsg::getMsg()->printf("Exiting:");

</code>

Clone this wiki locally