mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #3375 from haircommander/json-file-hotfix
Spoof json-file logging support
This commit is contained in:
@ -382,7 +382,7 @@ Not implemented
|
|||||||
|
|
||||||
**--log-driver**="*k8s-file*"
|
**--log-driver**="*k8s-file*"
|
||||||
|
|
||||||
Logging driver for the container. Currently not supported. This flag is a NOOP provided solely for scripting compatibility.
|
Logging driver for the container. Currently available options are *k8s-file* and *journald*, with *json-file* aliased to *k8s-file* for scripting compatibility.
|
||||||
|
|
||||||
**--log-opt**=*path*
|
**--log-opt**=*path*
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ Not implemented
|
|||||||
|
|
||||||
**--log-driver**="*k8s-file*"
|
**--log-driver**="*k8s-file*"
|
||||||
|
|
||||||
Logging driver for the container. Currently not supported. This flag is a NOOP provided solely for scripting compatibility.
|
Logging driver for the container. Currently available options are *k8s-file* and *journald*, with *json-file* aliased to *k8s-file* for scripting compatibility.
|
||||||
|
|
||||||
**--log-opt**=*path*
|
**--log-opt**=*path*
|
||||||
|
|
||||||
|
@ -246,7 +246,9 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
|
|||||||
}
|
}
|
||||||
|
|
||||||
logDriver := KubernetesLogging
|
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()
|
logDriver = ctr.LogDriver()
|
||||||
}
|
}
|
||||||
args = append(args, "-l", fmt.Sprintf("%s:%s", logDriver, ctr.LogPath()))
|
args = append(args, "-l", fmt.Sprintf("%s:%s", logDriver, ctr.LogPath()))
|
||||||
|
Reference in New Issue
Block a user