]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: trace: extend the source location to 13 chars
authorWilly Tarreau <w@1wt.eu>
Wed, 28 Aug 2019 07:59:49 +0000 (09:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Aug 2019 08:10:50 +0000 (10:10 +0200)
With 4-digit line numbers, this allows to emit up to 6 chars of file
name before extension, instead of 3 previously.

src/trace.c

index e8de89bac518c8fe5b8550ffef8738d4cfd062e0..8d68b664229bd598d24336a62b87c3e5d9e47b73 100644 (file)
@@ -178,9 +178,9 @@ void __trace(enum trace_level level, uint64_t mask, struct trace_source *src, co
         */
        line[0] = ist("[");
        line[1] = where;
-       if (line[1].len > 10) {
-               line[1].ptr += (line[1].len - 10);
-               line[1].len = 10;
+       if (line[1].len > 13) {
+               line[1].ptr += (line[1].len - 13);
+               line[1].len = 13;
        }
        line[2] = ist("] ");