1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

log: fix logging to syslog

This commit is contained in:
Steffen Vogel 2018-07-06 14:13:01 +02:00
parent 9e15dfdc34
commit 26541bae79

View file

@ -321,7 +321,11 @@ void log_vprint(struct log *l, const char *lvl, const char *fmt, va_list ap)
#ifdef ENABLE_OPAL_ASYNC
OpalPrint("VILLASnode: %s\n", buf);
#endif
fprintf(l->file ? l->file : stderr, "%s\n", buf);
if (l->file)
fprintf(l->file, "%s\n", buf);
if (l->syslog)
vsyslog(LOG_INFO, fmt, ap);
free(buf);
}