summaryrefslogtreecommitdiff
path: root/pkg/spec/createconfig.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-01-07 13:41:56 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-01-10 10:35:19 +0100
commit71341a194843fadf836b5460d09f685bb6c465b4 (patch)
tree115b8394df383e81b40d322cabc864f576ed6478 /pkg/spec/createconfig.go
parentf3fc10feb42930def6922fc050096ea38bafed7a (diff)
downloadpodman-71341a194843fadf836b5460d09f685bb6c465b4.tar.gz
podman-71341a194843fadf836b5460d09f685bb6c465b4.tar.bz2
podman-71341a194843fadf836b5460d09f685bb6c465b4.zip
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>
Diffstat (limited to 'pkg/spec/createconfig.go')
-rw-r--r--pkg/spec/createconfig.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index 244a8d1cd..6d058229b 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -282,10 +282,13 @@ func (c *CreateConfig) getContainerCreateOptions(runtime *libpod.Runtime, pod *l
options = append(options, libpod.WithStopSignal(c.StopSignal))
options = append(options, libpod.WithStopTimeout(c.StopTimeout))
- logPath := getLoggingPath(c.LogDriverOpt)
+ logPath, logTag := getLoggingOpts(c.LogDriverOpt)
if logPath != "" {
options = append(options, libpod.WithLogPath(logPath))
}
+ if logTag != "" {
+ options = append(options, libpod.WithLogTag(logTag))
+ }
if c.LogDriver != "" {
options = append(options, libpod.WithLogDriver(c.LogDriver))