sinkserver/sink/logging.c
Wolfgang Hottgenroth 778e288cb7 fixes for openbsd
2021-02-10 18:23:18 +01:00

18 lines
300 B
C

#define _DEFAULT_SOURCE
#include <syslog.h>
#include <stdarg.h>
// #include <stdio.h>
void logmsg(int prio, const char* format, ...) {
va_list vl;
openlog("counter", 0, LOG_LOCAL1);
va_start(vl, format);
vsyslog(prio, format, vl);
//vprintf(format, vl);
va_end(vl);
closelog();
}