From: Willy Tarreau Date: Fri, 30 Aug 2019 05:12:55 +0000 (+0200) Subject: MINOR: mux-h2/trace: always report the h2c/h2s state and flags X-Git-Tag: v2.1-dev2~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17104d46be7ae49d1d5aeb93d8f4dbc3e058b519;p=thirdparty%2Fhaproxy.git MINOR: mux-h2/trace: always report the h2c/h2s state and flags There's no limitation to just "state" trace level anymore, we're expected to always show these internal states at verbosity levels above "clean". --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 3097fc45c4..1023d20fb5 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -505,13 +505,13 @@ static void h2_trace(enum trace_level level, uint64_t mask, const struct trace_s if (h2c->st0 < H2_CS_FRAME_H) // nothing to add for now return; - if (src->level >= TRACE_LEVEL_STATE) { + if (src->verbosity > H2_VERB_CLEAN) { if (!h2s) - chunk_appendf(&trace_buf, " : h2c=%p st=%d", h2c, h2c->st0); + chunk_appendf(&trace_buf, " : h2c=%p(%s)", h2c, h2c_st_to_str(h2c->st0)); else if (h2s->id <= 0) - chunk_appendf(&trace_buf, " : h2c=%p st=%d dsi=%d (st=%d)", h2c, h2c->st0, h2c->dsi, h2s->st); + chunk_appendf(&trace_buf, " : h2c=%p(%s) dsi=%d h2s=%p(%d,%s)", h2c, h2c_st_to_str(h2c->st0), h2c->dsi, h2s, h2s->id, h2s_st_to_str(h2s->st)); else - chunk_appendf(&trace_buf, " : h2c=%p st=%d h2s=%p id=%d st=%d", h2c, h2c->st0, h2s, h2s->id, h2s->st); + chunk_appendf(&trace_buf, " : h2c=%p(%s) h2s=%p(%d,%s)", h2c, h2c_st_to_str(h2c->st0), h2s, h2s->id, h2s_st_to_str(h2s->st)); } /* Let's dump decoded requests and responses right after parsing. They