]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: log: Fix error message when using unavailable fetch in logfmt
authorTim Duesterhus <tim@bastelstu.be>
Fri, 3 Apr 2026 21:28:56 +0000 (23:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Apr 2026 12:02:29 +0000 (14:02 +0200)
commit34c17608e702a4061d649b63a4ddebf942b50a6c
treea67ceaaf1ce508ec3962282dd4298b20a5f75a90
parent34c9ded340d78dbd3f4b501965b937c0864efdd1
BUG/MINOR: log: Fix error message when using unavailable fetch in logfmt

The following configuration:

    defaults
     unique-id-format TEST-%[srv_name]

    frontend fe_http
     mode http

     bind :::8080 v4v6

Emitted the following error:

    [ALERT]    (219835) : Parsing [./patch.cfg:2]: failed to parse unique-id : sample fetch <srv_name]> may not be reliably used here because it needs 'server' which is not available here.

The `]` in the name of the sample fetch should not be there.

This bug exists since at least HAProxy 2.4, which is the oldest supported
version. The fix should be backported there.

Reviewed-by: Volker Dusch <github@wallbash.com>
src/log.c