]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream: fix output alignment of stuck thread dumps
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Sep 2023 14:43:07 +0000 (16:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Sep 2023 14:43:07 +0000 (16:43 +0200)
Since commit c185bc465 ("MEDIUM: stream: now provide full stream dumps
in case of loops"), the stuck threads show the stream's pointer in the
margin since it appears immediately after a line feed. Let's add it after
the prefix and "stream=" to make the output more readable.

src/debug.c

index 84c86d7959536b55ebabf20a79c231330e4ec1e1..a7e3dfd1013a182161dff6e48cac419b692f59d4 100644 (file)
@@ -324,8 +324,10 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
        else if (task->process == sc_conn_io_cb && task->context)
                s = sc_strm(((struct stconn *)task->context));
 
-       if (s)
+       if (s) {
+               chunk_appendf(buf, "%sstream=", pfx);
                strm_dump_to_buffer(buf, s, pfx, HA_ATOMIC_LOAD(&global.anon_key));
+       }
 
 #ifdef USE_LUA
        hlua = NULL;