]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: trace: Wrong displayed trace level
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 2 Dec 2020 15:51:00 +0000 (16:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Dec 2020 16:44:40 +0000 (17:44 +0100)
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.

src/trace.c

index 31843544838a7e8031f2da997730cb690a35d47f..d3722a167cd2c4d0d6bf53b0f55bb0918f5bf14a 100644 (file)
@@ -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) {