]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream: Dump the task expiration date in trace messages
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Feb 2023 13:41:53 +0000 (14:41 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Feb 2023 14:59:16 +0000 (15:59 +0100)
The expiration date of the stream's task is now diplayed in the trace
messages. This will help to track changes in the stream traces.

src/stream.c

index 597043c66016d50ee087ba4e10a664bd9ab89e2e..45b24f0799f83afc1984638b202c1a06b81d5d4e 100644 (file)
@@ -202,15 +202,16 @@ static void strm_trace(enum trace_level level, uint64_t mask, const struct trace
 
        /* If txn defined info about HTTP msgs, otherwise info about SI. */
        if (txn) {
-               chunk_appendf(&trace_buf, " - t=%p s=(%p,0x%08x,0x%x) txn.flags=0x%08x, http.flags=(0x%08x,0x%08x) status=%d",
-                             task, s, s->flags, s->conn_err_type, txn->flags, txn->req.flags, txn->rsp.flags, txn->status);
+               chunk_appendf(&trace_buf, " - t=%p t.exp=%u s=(%p,0x%08x,0x%x) txn.flags=0x%08x, http.flags=(0x%08x,0x%08x) status=%d",
+                             task, task->expire, s, s->flags, s->conn_err_type, txn->flags, txn->req.flags, txn->rsp.flags, txn->status);
        }
        else {
-               chunk_appendf(&trace_buf, " - t=%p s=(%p,0x%08x,0x%x) scf=(%p,%d,0x%08x,0x%x) scb=(%p,%d,0x%08x,0x%x) scf.exp(r,w)=(%u,%u) scb.exp(r,w)=(%u,%u) retries=%d",
-                             task, s, s->flags, s->conn_err_type,
+               chunk_appendf(&trace_buf, " - t=%p t.exp=%u s=(%p,0x%08x,0x%x) scf=(%p,%d,0x%08x,0x%x) scb=(%p,%d,0x%08x,0x%x) scf.exp(r,w)=(%u,%u) scb.exp(r,w)=(%u,%u) retries=%d",
+                             task, task->expire, s, s->flags, s->conn_err_type,
                              s->scf, s->scf->state, s->scf->flags, s->scf->sedesc->flags,
                              s->scb, s->scb->state, s->scb->flags, s->scb->sedesc->flags,
-                             sc_ep_rex(s->scf), sc_ep_wex(s->scf), sc_ep_rex(s->scb), sc_ep_wex(s->scb),
+                             sc_ep_rcv_ex(s->scf), sc_ep_snd_ex(s->scf),
+                             sc_ep_rcv_ex(s->scb), sc_ep_snd_ex(s->scb),
                              s->conn_retries);
        }