From: Frédéric Lécaille Date: Wed, 2 Dec 2020 15:51:00 +0000 (+0100) Subject: BUG/MINOR: trace: Wrong displayed trace level X-Git-Tag: v2.4-dev3~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd1831499eeaf6674723e157ad49e188ef9eb418;p=thirdparty%2Fhaproxy.git BUG/MINOR: trace: Wrong displayed trace level With commit a1f12746b ("MINOR: traces: add a new level "error" below the "user" level") a new trace level was inserted, resulting in shifting all exiting ones by one. But the levels reported in the __trace() function were not updated accordingly, resulting in the TRACE_LEVEL_DEVELOPER not to be properly reported anymore. This patch fixes it by extending the number of levels to 6. No backport is needed. --- diff --git a/src/trace.c b/src/trace.c index 3184354483..d3722a167c 100644 --- a/src/trace.c +++ b/src/trace.c @@ -190,7 +190,7 @@ void __trace(enum trace_level level, uint64_t mask, struct trace_source *src, line[words++] = ist(tnum); line[words++] = src->name; line[words++] = ist("|"); - line[words++] = ist2("01234" + level, 1); // "0" to "4" + line[words++] = ist2("012345" + level, 1); // "0" to "5" line[words++] = ist("|"); line[words] = where; if (line[words].len > 13) {