Add tag support to journald logging driver, closes #19556
Signed-off-by: Ivan Babrou <ibobrik@gmail.com> Upstream-commit: 5a3351883b254d3690e9dcc5b89293bcee474493 Component: engine
This commit is contained in:
@ -24,6 +24,7 @@ driver stores the following metadata in the journal with each message:
|
||||
| `CONTAINER_ID` | The container ID truncated to 12 characters. |
|
||||
| `CONTAINER_ID_FULL` | The full 64-character container ID. |
|
||||
| `CONTAINER_NAME` | The container name at the time it was started. If you use `docker rename` to rename a container, the new name is not reflected in the journal entries. |
|
||||
| `CONTAINER_TAG` | The container tag ([log tag option documentation](log_tags.md)). |
|
||||
|
||||
## Usage
|
||||
|
||||
@ -42,6 +43,11 @@ You can set the logging driver for a specific container by using the
|
||||
Users can use the `--log-opt NAME=VALUE` flag to specify additional
|
||||
journald logging driver options.
|
||||
|
||||
### tag
|
||||
|
||||
Specify template to set `CONTAINER_TAG` value in journald logs. Refer to
|
||||
[log tag option documentation](log_tags.md) for customizing the log tag format.
|
||||
|
||||
### labels and env
|
||||
|
||||
The `labels` and `env` options each take a comma-separated list of keys. If there is collision between `label` and `env` keys, the value of the `env` takes precedence. Both options add additional metadata in the journal with each message.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
aliases = ["/engine/reference/logging/log_tags/"]
|
||||
title = "Log tags for logging driver"
|
||||
description = "Describes how to format tags for."
|
||||
keywords = ["docker, logging, driver, syslog, Fluentd, gelf"]
|
||||
keywords = ["docker, logging, driver, syslog, Fluentd, gelf, journald"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
weight = 1
|
||||
|
||||
Reference in New Issue
Block a user