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.
This commit is contained in:
Frdric Lcaille 2020-12-02 16:51:00 +01:00 committed by Willy Tarreau
parent 3243447f83
commit fd1831499e

View File

@ -190,7 +190,7 @@ void __trace(enum trace_level level, uint64_t mask, struct trace_source *src,
line[words++] = ist(tnum); line[words++] = ist(tnum);
line[words++] = src->name; line[words++] = src->name;
line[words++] = ist("|"); 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++] = ist("|");
line[words] = where; line[words] = where;
if (line[words].len > 13) { if (line[words].len > 13) {