From e45779b303c8a44d0a7d5419a69fd62d1da2fab9 Mon Sep 17 00:00:00 2001 From: Jessie Murray Date: Sun, 18 Jul 2021 15:26:48 -0700 Subject: [PATCH] Change TRACE log level to a value greater than was ever in webdis.json --- src/slog.c | 3 ++- src/slog.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slog.c b/src/slog.c index c6d8c00..cae6d9a 100644 --- a/src/slog.c +++ b/src/slog.c @@ -116,8 +116,9 @@ slog_internal(struct server *s, log_level level, } /* generate output line. */ + char letter = (level == WEBDIS_TRACE ? 5 : c[level]); line_sz = snprintf(line, sizeof(line), - "[%d] %s %c %s\n", (int)s->log.self, time_buf, c[level], msg); + "[%d] %s %c %s\n", (int)s->log.self, time_buf, letter, msg); /* write to log and maybe flush to disk. */ ret = write(s->log.fd, line, line_sz); diff --git a/src/slog.h b/src/slog.h index 9400702..14d9c66 100644 --- a/src/slog.h +++ b/src/slog.h @@ -7,7 +7,7 @@ typedef enum { WEBDIS_NOTICE, WEBDIS_INFO, WEBDIS_DEBUG, - WEBDIS_TRACE + WEBDIS_TRACE = 8 } log_level; typedef enum {