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 {