log: support --log-opt tag=

support a custom tag to add to each log for the container.

It is currently supported only by the journald backend.

Closes: https://github.com/containers/libpod/issues/3653

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2020-01-07 13:41:56 +01:00
parent f3fc10feb4
commit 71341a1948
9 changed files with 133 additions and 19 deletions

View File

@ -419,6 +419,17 @@ Logging driver specific options. Used to set the path to the container log file
`--log-opt path=/var/log/container/mycontainer.json`
**--log-opt**=*tag*
Set custom logging configuration. Presently supports the `tag` option
which specified a custom log tag for the container. For example:
`--log-opt tag="{{.ImageName}}"`
It supports the same keys as `podman inspect --format`.
It is currently supported only by the journald log driver.
**--mac-address**=*address*
Container MAC address (e.g. 92:d0:c6:0a:29:33)