Hi everyone,
This seem to be a bug that I just ran into: when %ID is used in a
log-format, but unique-id-format is not defined, then everything after
%ID gets truncated from the logs.
Example:
== normal behavior
haproxy.cfg:
log-format %{+Q}r\ %ID\ "%B\ bytes"
unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid
log:
Mar 13 14:42:18 localhost haproxy[19447]: "GET
/v1/somethingsomething HTTP/1.1"
47B4176E:A19C_0A977AE4:01BB_5321C3C9_000A:4BF7 "805 bytes"
== broken behavior
haproxy.cfg:
log-format %{+Q}r\ %ID\ "%B\ bytes"
# unique-id-format %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid <=
commented out
log:
Mar 13 14:45:46 localhost haproxy[19879]: "GET
/v1/somethingsomething HTTP/1.1"
The log line above stops after the request, and doesn't log the
bytes_read %B.
I may have missed something in the doc, but I haven't seen it mentioned
anywhere.
--
Julien Vehent
http://jve.linuxwall.info