summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2023-02-15 08:38:55 -0600
committerDanny Holman <dholman@gymli.org>2023-02-15 08:38:55 -0600
commit960846b6f3e3bbc060a21a9d950ee569ed841ee2 (patch)
treea452f8fa125dd0a13ec0f1fffbd3469340a66837
parent6e19da5336b8681d16970bef0bfe30973f4e50ba (diff)
server: display errors and warnings in shell
Print LOG_WARNING and LOG_SEVERE messages into stderr. Signed-off-by: Danny Holman <dholman@gymli.org>
-rw-r--r--server/src/logging.c2
1 files changed, 2 insertions, 0 deletions
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);