logging to console
This commit is contained in:
parent
55284ac10c
commit
f1f96e4c2f
@ -2,14 +2,16 @@
|
|||||||
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void logmsg(int prio, const char* format, ...) {
|
void logmsg(int prio, const char* format, ...) {
|
||||||
va_list vl;
|
va_list vl;
|
||||||
|
|
||||||
openlog("counter", 0, LOG_LOCAL0);
|
// openlog("counter", 0, LOG_LOCAL0);
|
||||||
va_start(vl, format);
|
va_start(vl, format);
|
||||||
vsyslog(prio, format, vl);
|
//vsyslog(prio, format, vl);
|
||||||
|
vprintf(prio, format, vl);
|
||||||
va_end(vl);
|
va_end(vl);
|
||||||
closelog();
|
// closelog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user