projectatomic / docker

Docker - the open-source application container engine
http://www.docker.com
Apache License 2.0
81 stars 58 forks source link

Add tag as SYSLOG_IDENTIFIER for journald log driver #324

Open rjhowe opened 6 years ago

rjhowe commented 6 years ago

- What I did Added SYSLOG_IDENTIFIER when using docker journald log driver. When sending logs from journal to rsyslog programname will be set to the SYSLOG_IDENTIFIER and not defaulted to getting set to journal.

- How I did it https://github.com/moby/moby/commit/ae557f9d85f41e009229d1a33844f06f7ad1fb99 https://docs.docker.com/config/containers/logging/journald/

- How to verify it Run:

# docker run --name logging-test --entrypoint=/bin/echo registry.access.redhat.com/rhel7 "Hello Logs"
# journalctl CONTAINER_NAME=logging-test -o verbose

Then look for SYSLOG_IDENTIFIER being set to the same value as CONTAINER_TAG

- Description for the changelog Added tag as SYSLOG_IDENTIFIER for journald log driver

rjhowe commented 6 years ago

Issue discussed in the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1527918