Skip to content

Commit

Permalink
Spoof json-file logging support
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
haircommander authored and mheon committed Nov 11, 2019
1 parent 33c3f18 commit e01ca49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libpod/oci_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit e01ca49

Please sign in to comment.