From: Vladimír Čunát Date: Mon, 12 Jul 2021 19:37:52 +0000 (+0200) Subject: lib/log: make trace-logging not prevent normal logging X-Git-Tag: v5.4.0~2^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8cc9a120c7c75aaaa76432b28c252d2a4383e56;p=thirdparty%2Fknot-resolver.git lib/log: make trace-logging not prevent normal logging I think it's an old issue, but why not fix it now. I believe it's better when these two are "independent". Removed comment: once upon a time it belonged to auto_free and similar macros, but somehow it survived various moves. --- diff --git a/lib/log.c b/lib/log.c index 6e27e583f..255f70af3 100644 --- a/lib/log.c +++ b/lib/log.c @@ -251,10 +251,6 @@ void kr_log_init(log_level_t level, log_target_t target) kr_log_level_set(level); } - -/* - * Cleanup callbacks. - */ static void kr_vlog_req( const struct kr_request * const req, uint32_t qry_uid, const unsigned int indent, enum kr_log_group group, const char *tag, const char *fmt, @@ -270,8 +266,8 @@ static void kr_vlog_req( if (kr_log_rtrace_enabled(req)) req->trace_log(req, msg); - else - kr_log_fmt(group, LOG_DEBUG, SD_JOURNAL_METADATA, "[%-6s]%s", tag, msg); + + kr_log_fmt(group, LOG_DEBUG, SD_JOURNAL_METADATA, "[%-6s]%s", tag, msg); mp_delete(mp); }