From 960846b6f3e3bbc060a21a9d950ee569ed841ee2 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 15 Feb 2023 08:38:55 -0600 Subject: server: display errors and warnings in shell Print LOG_WARNING and LOG_SEVERE messages into stderr. Signed-off-by: Danny Holman --- server/src/logging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/logging.c b/server/src/logging.c index 5a721b8..e295116 100644 --- a/server/src/logging.c +++ b/server/src/logging.c @@ -26,10 +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); break; case LOG_WARNING: snprintf(output, 1024, "%s %s: %s", timestr, warn, fmt); ret = vfprintf(out_stream, output, args); + vfprintf(stderr, output, args); break; case LOG_INFO: snprintf(output, 1024, "%s %s: %s", timestr, info, fmt); -- cgit v1.2.3