]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DOC: config: add documentation for log profiles
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 30 May 2024 15:34:00 +0000 (17:34 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 13 Jun 2024 13:43:10 +0000 (15:43 +0200)
commit8fa4036daee77a174dee31bc5a7cbf65d4f5943b
treee88d1dd129f9c12d00104bccbb76ba4fdae45e7a
parentcc6fd2646b6c6017e98f41130db5c8432de8f2b1
DOC: config: add documentation for log profiles

Now that log-profile parsing logic has been implemented in "MINOR: log:
add log-profile parsing logic" and is actually effective since "MEDIUM:
log: handle log-profile in process_send_log()", let's document the feature
and add some examples.

Log-profile section is declared like this:

  log-profile myprof
    log-tag "custom-tag"

    on error format "%ci: error"
    on any format "(custom httplog) ${HAPROXY_HTTP_LOG_FMT}" sd "[exampleSDID@1234 step=\"accept\" id=\"%ID\"]"

(check out the documentation for the full list of options, some options
are only relevant under specific contexts)

And used this way (from usual "log" directive lines):

  global
    log stdout format rfc5424 profile myprof local0
                              --------------

For now, the use of log-profiles is somewhat limited because we lack
the ability to explicitly trigger the log building process at specific
steps during the stream handling, but it should gain more traction over
the time as the feature evolves and new mechanisms allowing the emission
of logs at expected processing steps will be added.

It should partially fix GH #401
doc/configuration.txt