Spoof json-file logging support

For docker scripting compatibility, allow for json-file logging when creating args for conmon. That way, when json-file is supported, that case can be easily removed.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
Peter Hunt 2019-06-19 10:04:06 -04:00
parent 589b12dbc9
commit 11fbd20f5d

View file

@ -246,7 +246,9 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
}
logDriver := KubernetesLogging
if ctr.LogDriver() != "" {
if ctr.LogDriver() == JSONLogging {
logrus.Errorf("json-file logging specified but not supported. Choosing k8s-file logging instead")
} else if ctr.LogDriver() != "" {
logDriver = ctr.LogDriver()
}
args = append(args, "-l", fmt.Sprintf("%s:%s", logDriver, ctr.LogPath()))