summaryrefslogtreecommitdiff
path: root/docs/admin/logging
diff options
context:
space:
mode:
authorSolganik Alexander <solganik@gmail.com>2016-02-03 22:59:27 +0200
committerSolganik Alexander <solganik@gmail.com>2016-03-09 22:31:11 +0200
commit1a40dd535fb12cade584f085baa23734e8a9bb0e (patch)
tree1f6a0179bcc05ecc334b5735c5e78fdfde582db5 /docs/admin/logging
parentf988741823c1c510e97f2508d6a5bed68f65440a (diff)
downloaddocker-1a40dd535fb12cade584f085baa23734e8a9bb0e.tar.gz
Fixes #18712. Add rfc5424 log format for syslog.
Previously docker used obsolete rfc3164 syslog format for syslog. rfc3164 explicitly uses semicolon as a separator between 'TAG' and 'Content' section of the log message. Docker uses semicolon as a separator between image name and version tag. When {{.ImageName}} was used as a tag expression and contained ":" syslog parser mistreated "tag" part of the image name as syslog message body, which resulted in incorrect "syslogtag" been reported by syslog daemon. Use of rfc5424 log format partually fixes the issue as it does not use semicolon as a separator. However using default rfc5424 syslog format itroduces backward incompatability because rsyslog template keyword %syslogtag% is parsed differently. In rfc3164 it uses the "TAG" part reported before the "pid" part. In rfc5424 it uses "appname" part reported before the pid part, while tag part is introduced by %msgid% part. For more information on rsyslog configuration properties see: http://www.rsyslog.com/doc/master/configuration/properties.html Added two options to specify logging in either rfc5424, rfc3164 format or unix format omitting hostname in order to keep backwards compatability with previous versions. Signed-off-by: Solganik Alexander <solganik@gmail.com>
Diffstat (limited to 'docs/admin/logging')
-rw-r--r--docs/admin/logging/overview.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/admin/logging/overview.md b/docs/admin/logging/overview.md
index e3d3d11256..8338ab3286 100644
--- a/docs/admin/logging/overview.md
+++ b/docs/admin/logging/overview.md
@@ -80,6 +80,7 @@ The following logging options are supported for the `syslog` logging driver:
--log-opt syslog-tls-key=/etc/ca-certificates/custom/key.pem
--log-opt syslog-tls-skip-verify=true
--log-opt tag="mailer"
+ --log-opt syslog-format=[rfc5424|rfc3164]
`syslog-address` specifies the remote syslog server address where the driver connects to.
If not specified it defaults to the local unix socket of the running system.
@@ -131,6 +132,11 @@ By default, Docker uses the first 12 characters of the container ID to tag log m
Refer to the [log tag option documentation](log_tags.md) for customizing
the log tag format.
+`syslog-format` specifies syslog message format to use when logging.
+If not specified it defaults to the local unix syslog format without hostname specification.
+Specify rfc3164 to perform logging in RFC-3164 compatible format. Specify rfc5424 to perform
+logging in RFC-5424 compatible format
+
## journald options