]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: log: use lf_rawtext for lf_ip() and lf_port() hex strings
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 3 Apr 2024 13:42:35 +0000 (15:42 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 26 Apr 2024 16:39:31 +0000 (18:39 +0200)
commit2e4cc517bf69cda283fd4d03c2969e43ede63a06
tree743bc2cd25068369dc65c2fa35e0d97495355b16
parent3a3bdf1c7664ad221d78fad78bd6b8cf8a615e99
MEDIUM: log: use lf_rawtext for lf_ip() and lf_port() hex strings

Same as the previous commit, but for ip and port oriented values when
+X option is provided.

No functional change should be expected.

Because of this patch, we add a little overhead because we first generate
the text into a temporary variable and then use lf_rawtext() to print it.
Thus we have a double-copy, and this could have some performance
implications that were not yet evaluated. Due to the small number of bytes
that can end up being copied twice, we could be lucky and have no visible
performance impact, but if we happen to see a significant impact, it could
be useful to add a passthrough mechanism (to keep historical behavior)
when no encoding is involved.
src/log.c