syslog.c
345 Bytes
#include <syslog.h>
const int priority[] = {
LOG_USER | LOG_EMERG,
LOG_USER | LOG_ALERT,
LOG_USER | LOG_CRIT,
LOG_USER | LOG_ERR,
LOG_USER | LOG_WARNING,
LOG_USER | LOG_NOTICE,
LOG_USER | LOG_INFO,
LOG_USER | LOG_DEBUG
};
void
logger_syslog(int level, const char * msg)
{
syslog(priority[level], "%s", msg);
}
// vim: set ts=4 sw=4: