From: Vladimír Čunát Date: Wed, 4 Aug 2021 09:40:30 +0000 (+0200) Subject: trace_log: include the "[group]" tag in the messages X-Git-Tag: v5.4.1~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cb46e6ffc9b210838a6abef1e21b47bb14cbf91;p=thirdparty%2Fknot-resolver.git trace_log: include the "[group]" tag in the messages --- diff --git a/lib/log.c b/lib/log.c index 31ca8e9ba..76b4cf038 100644 --- a/lib/log.c +++ b/lib/log.c @@ -272,15 +272,15 @@ static void kr_vlog_req( struct mempool *mp = mp_new(512); const uint32_t req_uid = req ? req->uid : 0; - char *msg = mp_printf(mp, "[%05u.%02u] %*s", - req_uid, qry_uid, indent, ""); + char *msg = mp_printf(mp, "[%-6s][%05u.%02u] %*s", + tag, req_uid, qry_uid, indent, ""); msg = mp_vprintf_append(mp, msg, fmt, args); if (req_has_trace_log(req)) req->trace_log(req, msg); - kr_log_fmt(group, LOG_DEBUG, SD_JOURNAL_METADATA, "[%-6s]%s", tag, msg); + kr_log_fmt(group, LOG_DEBUG, SD_JOURNAL_METADATA, "%s", msg); mp_delete(mp); }