From 241e4abc2d16517da061c4e3b31a09c0887c7beb Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 1 Apr 2022 15:16:40 +0200 Subject: [PATCH] Reduce log level of SPTPS errors. SPTPS error messages should not always be logged, they are mostly low-level details, and serious errors like failing to connect to a node due to SPTPS issues will be logged by higher layers anyway, so move it down to log level 3. Fixes #298 on GitHub. --- src/logger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logger.c b/src/logger.c index 390023bb..f8e82090 100644 --- a/src/logger.c +++ b/src/logger.c @@ -150,7 +150,7 @@ static void sptps_logger(sptps_t *s, int s_errno, const char *format, va_list ap char message[1024]; size_t msglen = sizeof(message); - if(!should_log(DEBUG_ALWAYS)) { + if(!should_log(DEBUG_TRAFFIC)) { return; } @@ -171,7 +171,7 @@ static void sptps_logger(sptps_t *s, int s_errno, const char *format, va_list ap } } - real_logger(DEBUG_ALWAYS, LOG_ERR, message); + real_logger(DEBUG_TRAFFIC, LOG_ERR, message); } void openlogger(const char *ident, logmode_t mode) { -- 2.20.1