BUG/MEDIUM: local log format regression.
authorEmeric Brun <ebrun@haproxy.com>
Fri, 27 Nov 2020 15:24:34 +0000 (16:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 08:19:14 +0000 (09:19 +0100)
commita0338b95c470438629eb2558baf8c4c98fd226be
tree49fd5e26e8d8ef5b7beaabc88c9f3926b84b7aaa
parent3027cdc621d8fe6926361fccb1ea3e33a1c30853
BUG/MEDIUM: local log format regression.

Since 2.3 default local log format always adds hostame field.
This behavior change was due to log/sink re-work, because according
to rfc3164 the hostname field is mandatory.

This patch re-introduce a legacy "local" format which is analog
to rfc3164 but with hostname stripped. This is the new
default if logs are generated by haproxy.

To stay compliant with previous configurations, the option
"log-send-hostname" acts as if the default format is switched
to rfc3164.

This patch addresses the github issue #963

This patch should be backported in branches >= 2.3.

(cherry picked from commit 0237c4e3f5deb062e8714d02588c86d48fa2703c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
doc/configuration.txt
include/haproxy/log-t.h
src/log.c
src/sink.c