]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: log: report file name, line number, and directive name with log-format errors
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2013 16:30:32 +0000 (18:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2013 16:36:00 +0000 (18:36 +0200)
commitb1f3af232798350fa7adc1f77fdbbfd80ae56c53
tree1e2de3d6401f524e08a444a9e66f1a912ff2e3e6
parent62a6123fedb7ad5539a669de8dc88b983c0922e0
MEDIUM: log: report file name, line number, and directive name with log-format errors

Improve error log reporting in the format parser by always giving the
file name, line number, and directive name instead of the hard-coded
"log-format".

Previously we got this when dealing with log-format errors:
  [WARNING] 101/183012 (8561) : Warning: log-format variable name 'r' is not suited to HTTP mode
  [WARNING] 101/183012 (8561) : log-format: sample fetch <hdr(a,1)> may not be reliably used with 'log-format' because it needs 'HTTP request headers,HTTP response headers' which is not available here.
  [WARNING] 101/183012 (8561) : Warning: no such variable name 'k' in log-format

Now we have this :
  [WARNING] 101/183016 (8593) : parsing [fmt.cfg:8] : 'log-format' variable name 'r' is reserved for HTTP mode
  [WARNING] 101/183016 (8593) : parsing [fmt.cfg:8] : 'log-format' : sample fetch <hdr(a,1)> may not be reliably used here because it needs 'HTTP request headers,HTTP response headers' which is not available here.
  [WARNING] 101/183016 (8593) : parsing [fmt.cfg:15] : no such variable name 'k' in 'unique-id-format'
src/log.c
src/proxy.c