Hi, > log-format "%{+Q}[var(txn.pv)]"
Could you please try adding %B to your log-format string as well? example: > log-format "%{+Q}[var(txn.pv)] (%B)" What I suspect is that the logline is builded before the tcp-response rules are actually evaluated. Some haproxy log format specifiers/variables add the LW_BYTES flag to px->to_log to prevent the log from being emitted too early (ie: if some of the variables depend on the response: %B, %TR...), but as far as I know this flag cannot be set manually when using custom log-format variables. Adding "%B" or response-oriented log variables (that enables LW_BYTES flag) to your custom log-format should act as a workaround to make sure the logline is builded after the response rules have been evaluated (at the end of the session, unless "option logasap" is specified). Regards, Aurelien