]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: log: fix regression on log-format handling
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2013 16:13:46 +0000 (18:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2013 16:13:46 +0000 (18:13 +0200)
commit62a6123fedb7ad5539a669de8dc88b983c0922e0
tree98a269fb92b9d01137754ab0d8b5d83be3c78e46
parentd16a1b2a818359e8c3ade85f789e66ed7ca9488c
BUG/MEDIUM: log: fix regression on log-format handling

Commit a4312fa2 merged into dev18 improved log-format management by
processing "log-format" and "unique-id-format" where they were declared,
so that the faulty args could be reported with their correct line numbers.

Unfortunately, the log-format parser considers the proxy mode (TCP/HTTP)
and now if the directive is set before the "mode" statement, it can be
rejected and report warnings.

So we really need to parse these directives at the end of a section at
least. Right now we do not have an "end of section" event, so we need
to store the file name and line number for each of these directives,
and take care of them at the end.

One of the benefits is that now the line numbers can be inherited from
the line passing "option httplog" even if it's in a defaults section.

Future improvements should be performed to report line numbers in every
log-format processed by the parser.
include/types/proxy.h
src/cfgparse.c
src/haproxy.c
src/proxy.c