From e01ca4912e10403aaa20a0d62d5b0a35dd2826f6 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 19 Jun 2019 10:04:06 -0400 Subject: [PATCH] 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 --- libpod/oci_linux.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libpod/oci_linux.go b/libpod/oci_linux.go index 9bbefdb060..6e84c07596 100644 --- a/libpod/oci_linux.go +++ b/libpod/oci_linux.go @@ -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()))