Update log_tags.md (#4351)

This commit is contained in:
Wang Jie 2017-09-12 07:53:54 +08:00 committed by Misty Stanley-Jones
parent 527cd9dfad
commit 07ffdd4f2f
1 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ title: Log tags for logging driver
The `tag` log option specifies how to format a tag that identifies the The `tag` log option specifies how to format a tag that identifies the
container's log messages. By default, the system uses the first 12 characters of container's log messages. By default, the system uses the first 12 characters of
the container id. To override this behavior, specify a `tag` option: the container ID. To override this behavior, specify a `tag` option:
```bash ```bash
$ docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224 --log-opt tag="mailer" $ docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224 --log-opt tag="mailer"
@ -19,11 +19,11 @@ Docker supports some special template markup you can use when specifying a tag's
{% raw %} {% raw %}
| Markup | Description | | Markup | Description |
|--------------------|------------------------------------------------------| |--------------------|------------------------------------------------------|
| `{{.ID}}` | The first 12 characters of the container id. | | `{{.ID}}` | The first 12 characters of the container ID. |
| `{{.FullID}}` | The full container id. | | `{{.FullID}}` | The full container ID. |
| `{{.Name}}` | The container name. | | `{{.Name}}` | The container name. |
| `{{.ImageID}}` | The first 12 characters of the container's image id. | | `{{.ImageID}}` | The first 12 characters of the container's image ID. |
| `{{.ImageFullID}}` | The container's full image identifier. | | `{{.ImageFullID}}` | The container's full image ID. |
| `{{.ImageName}}` | The name of the image used by the container. | | `{{.ImageName}}` | The name of the image used by the container. |
| `{{.DaemonName}}` | The name of the docker program (`docker`). | | `{{.DaemonName}}` | The name of the docker program (`docker`). |