]> git.kaiwu.me - haproxy.git/commit
CLEANUP: cfgparse-listen: move the log format keywords to their own parser
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Oct 2026 16:52:10 +0000 (18:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2026 07:31:07 +0000 (09:31 +0200)
commit925c846b0ff198519cf1810eb7904954033a5074
tree38c6b5456087cb8b37a77967b106418d27728ef5
parent6134fe02029f477e68bde0c1765d46ecdb5dbdd7
CLEANUP: cfgparse-listen: move the log format keywords to their own parser

"log-format", "log-format-sd", "error-log-format" and "unique-id-format"
all assign a log format expression to the proxy and were handled almost
the same way, so they were moved together to proxy_parse_logformat() and
listed in cfg_kws, making them discoverable via "-dKcfg".

All common parts (arg check, allocation, warning about backends being
ignored) are now shared and performed first. The result of strdup() of
the file name is now checked. The code is cleaner and smaller:

   90 insertions(+), 124 deletions(-)
src/cfgparse-listen.c