From 82603c3abe1bb38e02e5088db8225cc399ba7111 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 8 Jul 2016 11:43:42 -0700 Subject: [PATCH] Add logdrivers to executor from swarmkit Signed-off-by: Tonis Tiigi (cherry picked from commit 8a50315f3ce89b24e3556dba288b2ce7b4daf026) Signed-off-by: Tibor Vass --- daemon/cluster/executor/container/container.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/daemon/cluster/executor/container/container.go b/daemon/cluster/executor/container/container.go index 0bc6958155..16301f23fd 100644 --- a/daemon/cluster/executor/container/container.go +++ b/daemon/cluster/executor/container/container.go @@ -266,11 +266,20 @@ func getMountMask(m *api.Mount) string { } func (c *containerConfig) hostConfig() *enginecontainer.HostConfig { - return &enginecontainer.HostConfig{ + hc := &enginecontainer.HostConfig{ Resources: c.resources(), Binds: c.binds(), Tmpfs: c.tmpfs(), } + + if c.task.LogDriver != nil { + hc.LogConfig = enginecontainer.LogConfig{ + Type: c.task.LogDriver.Name, + Config: c.task.LogDriver.Options, + } + } + + return hc } // This handles the case of volumes that are defined inside a service Mount