49 openlog(
"flowgrindd", LOG_NDELAY | LOG_CONS | LOG_PID, LOG_DAEMON);
69 void logging(
int priority,
const char *fmt, ...)
78 void vlogging(
int priority,
const char *fmt, va_list ap)
80 char timestamp[30] =
"";
81 ctimenow_r(timestamp,
sizeof(timestamp),
false);
85 vsyslog(priority, fmt, ap);
88 fprintf(stderr,
"%s ", timestamp);
89 vfprintf(stderr, fmt, ap);
90 fprintf(stderr,
"\n");
94 fprintf(stdout,
"%s ", timestamp);
95 vfprintf(stdout, fmt, ap);
96 fprintf(stdout,
"\n");