haproxy/dev/flags
Willy Tarreau 2fab37eaf3 DEV: flags/show-sess-to-flags: add support for color output
Highlighting a few fields helps spot them, but only if there are not too
many. What is done here is the following:
  - the first line of each stream is highlighted in white (helps find
    beginning/end in long dumps
  - fields in the form name=value where value starts with upper case
    letters are considered as a state dump (e.g. stconn state) and are
    also highlighted. This results in ~20 pairs. In this case the name
    and value use two different colors (cyan vs yellow) to further help
    find what is being looked for

This is only done when the output is a terminal or when --color=always
is passed. It's also possible to disable it with --color=never or
--no-color.
2023-05-10 17:48:00 +02:00
..
flags.c BUILD: flags: really restrict the cases where flags are exposed 2022-11-24 08:32:27 +01:00
README DEV: flags: use "sc" for stream conns instead of "cs" 2022-05-27 19:33:35 +02:00
show-fd-to-flags.sh
show-sess-to-flags.sh DEV: flags/show-sess-to-flags: add support for color output 2023-05-10 17:48:00 +02:00

This needs to be built from the top makefile, for example :

    make dev/flags/flags

Then the executable is usable either one value at a time from the
command line, either with values coming from stdin with "-" passed
alone instead of the value.

It is possible to restrict the decoding to certain fields only by
specifying one of "ana", "chn", "conn", "sc", "si", "sierr", "strm",
"task", or "txn" before the value.