]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: config: support some pseudo-variables for file/line/section
authorWilly Tarreau <w@1wt.eu>
Thu, 6 May 2021 08:25:11 +0000 (10:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 May 2021 08:36:38 +0000 (10:36 +0200)
commita46f1af2b192dbeb2640e60a74c9c2fcb317cd0e
treeb71335233329514c2162dc415013d7e5cf5f6267
parent5150805a5cac25213a8575a8de19c8f57031e168
MINOR: config: support some pseudo-variables for file/line/section

The new pseudo-variables ".FILE", ".LINE" and ".SECTION" will be resolved
on the fly by the config parser and will respectively retrieve the current
configuration file name, the current line number and the current section
being parsed. This may help emit logs, errors, and debugging information
(e.g. which rule matched).

The '.' in the first char was reserved for such pseudo-variables and no
other variable is permitted. This will allow to add support for new ones
in the future if they prove to be useful (e.g. randoms/uuid for secret
keying or automatic naming of configuration objects).
doc/configuration.txt
src/tools.c