mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-01 23:39:32 +00:00
MINOR: mux-quic: activate qmux traces on stdout via macro
This commit is similar to the following one :
commit 118b2cbf84
MINOR: quic: activate QUIC traces at compilation
If the macro ENABLE_QUIC_STDOUT_TRACES is defined, qmux traces are
outputted automatically on stdout. This is useful for the haproxy-qns
interop docker image.
This commit is contained in:
parent
fdcec3644a
commit
251eadfce5
@ -8,6 +8,7 @@
|
||||
#include <haproxy/dynbuf.h>
|
||||
#include <haproxy/htx.h>
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/sink.h>
|
||||
#include <haproxy/ssl_sock-t.h>
|
||||
#include <haproxy/trace.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
@ -1215,6 +1216,21 @@ static void qmux_trace(enum trace_level level, uint64_t mask,
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to automatically activate QUIC MUX traces on stdout.
|
||||
* Activated via the compilation flag -DENABLE_QUIC_STDOUT_TRACES.
|
||||
* Main use for now is in the docker image for QUIC interop testing.
|
||||
*/
|
||||
static void qmux_init_stdout_traces(void)
|
||||
{
|
||||
#ifdef ENABLE_QUIC_STDOUT_TRACES
|
||||
trace_qmux.sink = sink_find("stdout");
|
||||
trace_qmux.level = TRACE_LEVEL_DEVELOPER;
|
||||
trace_qmux.state = TRACE_STATE_RUNNING;
|
||||
trace_qmux.verbosity = QMUX_VERB_MINIMAL;
|
||||
#endif
|
||||
}
|
||||
INITCALL0(STG_INIT, qmux_init_stdout_traces);
|
||||
|
||||
|
||||
static const struct mux_ops qc_ops = {
|
||||
.init = qc_init,
|
||||
|
Loading…
Reference in New Issue
Block a user