From d6953e86b7466f8e29ea89f38023a3cca58f07b6 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Tue, 28 Apr 2015 21:23:27 -0400 Subject: [PATCH] journald log driver: use CONTAINER_ID field for container id This patch modifies the journald log driver to store the container ID in a field named CONTAINER_ID, rather than (ab)using the MESSAGE_ID field. Additionally, this adds the CONTAINER_ID_FULL field containing the complete container ID and CONTAINER_NAME, containing the container name. When using the journald log driver, this permits you to see log messages from a particular container like this: # journalctl CONTAINER_ID=a9238443e193 Example output from "journalctl -o verbose" includes the following: CONTAINER_ID=27aae7361e67 CONTAINER_ID_FULL=27aae7361e67e2b4d3864280acd2b80e78daf8ec73786d8b68f3afeeaabbd4c4 CONTAINER_NAME=web Closes: #12864 Signed-off-by: Lars Kellogg-Stedman Upstream-commit: c6bcaacce7067d77cb3552b8f4a97cf3b3c92785 Component: cli --- components/cli/docs/sources/reference/run.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cli/docs/sources/reference/run.md b/components/cli/docs/sources/reference/run.md index 8d97ad7aec..60a180584f 100644 --- a/components/cli/docs/sources/reference/run.md +++ b/components/cli/docs/sources/reference/run.md @@ -812,7 +812,7 @@ command is not available for this logging driver #### Logging driver: journald -Journald logging driver for Docker. Writes log messages to journald. `docker logs` command is not available for this logging driver +Journald logging driver for Docker. Writes log messages to journald; the container id will be stored in the journal's `CONTAINER_ID` field. `docker logs` command is not available for this logging driver. For detailed information on working with this logging driver, see [the journald logging driver](reference/logging/journald) reference documentation. ## Overriding Dockerfile image defaults