From: Aurelien DARRAGON Date: Fri, 2 Oct 2026 13:56:03 +0000 (+0200) Subject: DOC: config: document new "loggers" section and relevant uses X-Git-Tag: v3.5-dev9~205 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=f2ff92910051cb1d41cda59ee469e2c1ea0c6475;p=haproxy.git DOC: config: document new "loggers" section and relevant uses loggers (plural) section may be used to defined a group of log directives within a single section that can be used later in the config as a replacement of "log" directive to specify log target(s), for instance in a proxy section to inherit from existing loggers or directly on a do-log action to send generated log to specific endpoints only. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 2a0c1286d..b6eac57f9 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -9552,6 +9552,7 @@ load-server-state-from-file { global | local | none } log global +log to log [len ] [format ] [sample :] [profile ] [ []] no log @@ -9574,6 +9575,10 @@ no log in the "global" section. Only one "log global" statement may be used per instance, and this form takes no other parameter. + to should be used to specify a list of comma separated loggers section + names . The loggers defined in the targeted loggers + section will be inherited on the proxy. + indicates where to send the logs. It takes the same format as for the "global" section's logs, and can be one of : @@ -15930,7 +15935,7 @@ disable-l7-retry reason than a connection failure. This can be useful for example to make sure POST requests aren't retried on failure. -do-log [profile ] +do-log [profile ] [to ] Usable in: QUIC Ini| TCP RqCon| RqSes| RqCnt| RsCnt| HTTP Req| Res| Aft X | X | X | X | X | X | X | X @@ -15970,6 +15975,11 @@ do-log [profile ] # in my-dft-prof tcp-request content do-log + Optional "to " may be used to specify a comma separated list + of loggers sections named that should be used exclusively as log + destination for the do-log action instead of the default loggers (the ones + inherited from the proxy). + do-ocsp-request status-var [ reason-var ] Usable in: QUIC Ini| TCP RqCon| RqSes| RqCnt| RsCnt| HTTP Req| Res| Aft - | - | - | X | - | X | - | - @@ -30334,6 +30344,22 @@ on [drop] [format ] [sd ] # error: # <134>1 2024-06-12T10:09:51.566524+02:00 - custom-tag 224482 - - 127.0.0.1: error +8.3.5. Loggers +------------------- + +Individual loggers (log endpoint) can be declared at the proxy level (including global +and default sections) directly using "log" directive. But they can also be grouped +under the same section using "loggers" specific section, and later be referenced +in the config file. + +loggers + Creates a new loggers group identified as + +log [len ] [format ] [sample :] + [ []] + Declare an individual log endpoint, refer to "log" directive under proxy + section for directive usage. + 8.4. Timing events ------------------