2021-02-09 18:48:50 +01:00
|
|
|
#define _DEFAULT_SOURCE
|
2021-02-09 18:47:20 +01:00
|
|
|
|
2021-02-09 18:32:58 +01:00
|
|
|
#include <syslog.h>
|
|
|
|
#include <stdarg.h>
|
2021-02-09 18:53:32 +01:00
|
|
|
#include <stdio.h>
|
2021-02-09 18:32:58 +01:00
|
|
|
|
|
|
|
void logmsg(int prio, const char* format, ...) {
|
|
|
|
va_list vl;
|
|
|
|
|
2021-02-09 18:53:32 +01:00
|
|
|
// openlog("counter", 0, LOG_LOCAL0);
|
2021-02-09 18:32:58 +01:00
|
|
|
va_start(vl, format);
|
2021-02-09 18:53:32 +01:00
|
|
|
//vsyslog(prio, format, vl);
|
|
|
|
vprintf(prio, format, vl);
|
2021-02-09 18:32:58 +01:00
|
|
|
va_end(vl);
|
2021-02-09 18:53:32 +01:00
|
|
|
// closelog();
|
2021-02-09 18:32:58 +01:00
|
|
|
}
|
|
|
|
|