]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: log: add compiling logic to logformat expressions
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 29 Feb 2024 13:54:43 +0000 (14:54 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 4 Apr 2024 17:10:01 +0000 (19:10 +0200)
commit2b79457bc026dfdf5270ce8c572992d8ba56a67c
treef9937291576a09a3daf1086288b9d17a88e965bd
parent7a21c3a4ef1577985621953a79e2776ef97837ab
MEDIUM: log: add compiling logic to logformat expressions

split parse_logformat_string() into two functions:

parse_logformat_string() sticks to the same behavior, but now becomes an
helper for lf_expr_compile() which uses explicit arguments so that it
becomes possible to use lf_expr_compile() without a proxy, but also
compile an expression which was previously prepared for compiling (set
string and config hints within the logformat expression to avoid manually
storing string and config context if the compiling step happens later).

lf_expr_dup() may be used to duplicate an expression before it is
compiled, lf_expr_xfer() now makes sure that the input logformat is
already compiled.

This is some prerequisite works for log-profiles implementation, no
functional change should be expected.
include/haproxy/log-t.h
include/haproxy/log.h
src/log.c