diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/logging.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/logging.c b/server/src/logging.c index e295116..6adaf51 100644 --- a/server/src/logging.c +++ b/server/src/logging.c @@ -26,12 +26,12 @@ int vlog_msg(int level, const char *fmt, va_list args) { case LOG_SEVERE: snprintf(output, 1024, "%s %s: %s", timestr, severe, fmt); ret = vfprintf(out_stream, output, args); - vfprintf(stderr, output, args); + vfprintf(out_stream, output, args); break; case LOG_WARNING: snprintf(output, 1024, "%s %s: %s", timestr, warn, fmt); ret = vfprintf(out_stream, output, args); - vfprintf(stderr, output, args); + vfprintf(out_stream, output, args); break; case LOG_INFO: snprintf(output, 1024, "%s %s: %s", timestr, info, fmt); @@ -54,6 +54,10 @@ int log_msg(int level, const char *fmt, ...) { done = vlog_msg(level, fmt, args); va_end(args); + va_start(args, fmt); + done = vfprintf(stderr, fmt, args); + va_end(args); + return done; } |