]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/log: make trace-logging not prevent normal logging
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 12 Jul 2021 19:37:52 +0000 (21:37 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Thu, 29 Jul 2021 09:42:34 +0000 (11:42 +0200)
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.

lib/log.c

index 6e27e583f3d681451b47f4abeb78ccb0ceb038e0..255f70af341145565c69567d824a2bab189aba75 100644 (file)
--- 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);
 }