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>
Mon, 19 Apr 2021 06:22:15 +0000 (08:22 +0200)
commitfd81848c2210fd88fdaa088723240930f3db4d63
treee054306c06ceb9913dc19d647aeefb85feddd07c
parent0f1fc23d4e3060c4277c11c9f1f41c27d8e54fbf
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.
src/log.c