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>
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 79abb82..ec181f2 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -1279,7 +1279,12 @@
<format> is the log format used when generating syslog messages. It may be
one of the following :
- rfc3164 The RFC3164 syslog message format. This is the default.
+ local Analog to rfc3164 syslog message format except that hostname
+ field is stripped. This is the default.
+ Note: option "log-send-hostname" switches the default to
+ rfc3164.
+
+ rfc3164 The RFC3164 syslog message format.
(https://tools.ietf.org/html/rfc3164)
rfc5424 The RFC5424 syslog message format.
@@ -2931,13 +2936,18 @@
The PID, process name and system name are omitted. This is
designed to be used with a local log server.
+ local Analog to rfc3164 syslog message format except that hostname
+ field is stripped. This is the default.
+ Note: option "log-send-hostname" switches the default to
+ rfc3164.
+
raw A message containing only the text. The level, PID, date, time,
process name and system name are omitted. This is designed to be
used in containers or during development, where the severity
only depends on the file descriptor used (stdout/stderr). This
is the default.
- rfc3164 The RFC3164 syslog message format. This is the default.
+ rfc3164 The RFC3164 syslog message format.
(https://tools.ietf.org/html/rfc3164)
rfc5424 The RFC5424 syslog message format.
@@ -7174,7 +7184,12 @@
<format> is the log format used when generating syslog messages. It may be
one of the following :
- rfc3164 The RFC3164 syslog message format. This is the default.
+ local Analog to rfc3164 syslog message format except that hostname
+ field is stripped. This is the default.
+ Note: option "log-send-hostname" switches the default to
+ rfc3164.
+
+ rfc3164 The RFC3164 syslog message format.
(https://tools.ietf.org/html/rfc3164)
rfc5424 The RFC5424 syslog message format.