MINOR: logs: Add support of checks as session origin to format lf strings
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 14 Apr 2021 12:01:41 +0000 (14:01 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 21 Apr 2021 08:13:37 +0000 (10:13 +0200)
commit7ebe7f32d13b7794949e8757d330897aa1e044c9
treeaf0b90849709c207169a7b1e61408fa62572608b
parent644cf33f3e2720ae65bb21e2ecec8b1224c38197
MINOR: logs: Add support of checks as session origin to format lf strings

When a log-format string is built from an health-check, the session origin
is the health-check itself and not a connection. In addition, there is no
stream. It means for now some formats are not supported: %s, %sc, %b, %bi,
%bp, %si and %sp.

Thanks to this patch, the session origin is converted to a check. So it is
possible to retrieve the backend and the backend connection. Note this
session have no listener, thus %ft format must be guarded.

This patch is light and standalone, thus it may be backported as far as 2.2
if required. However, because the error is human, it is probably better to
wait a bit to be sure everything is properly protected.

(cherry picked from commit fd81848c2210fd88fdaa088723240930f3db4d63)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/log.c