mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-15 14:41:32 +01:00
BUG/MINOR: log: Dump good %B and %U values in logs
When per-stream "bytes_in" and "bytes_out" counters where replaced in 3.3, the wrong counters were used for %B and %U values in logs. In the configuration manual and the commit message, it was specificed that "bytes_in" was replaced by "req_in" and "bytes_out" by "res_in", but in the code, wrong counters were used. It is now fixed. This patch should fix the issue #3208. It must be backported to 3.3.
This commit is contained in:
parent
be998b590e
commit
5d74980277
@ -4629,14 +4629,14 @@ int sess_build_logline_orig(struct session *sess, struct stream *s,
|
||||
case LOG_FMT_BYTES: // %B
|
||||
if (!(fe->to_log & LW_BYTES))
|
||||
LOGMETACHAR('+');
|
||||
ret = lf_int(tmplog, dst + maxsize - tmplog, logs->req_in, ctx, LF_INT_LLTOA);
|
||||
ret = lf_int(tmplog, dst + maxsize - tmplog, logs->res_in, ctx, LF_INT_LLTOA);
|
||||
if (ret == NULL)
|
||||
goto out;
|
||||
tmplog = ret;
|
||||
break;
|
||||
|
||||
case LOG_FMT_BYTES_UP: // %U
|
||||
ret = lf_int(tmplog, dst + maxsize - tmplog, logs->res_out, ctx, LF_INT_LLTOA);
|
||||
ret = lf_int(tmplog, dst + maxsize - tmplog, logs->req_in, ctx, LF_INT_LLTOA);
|
||||
if (ret == NULL)
|
||||
goto out;
|
||||
tmplog = ret;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user