summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-19 20:33:00 +0200
committerGitHub <noreply@github.com>2019-06-19 20:33:00 +0200
commite90d769af34df582edd31f29d6c81acc4256a816 (patch)
tree82e38302203aac978f205581dfd148d46b7380ff
parent4d470c73ca9f441ced162431270977b967b547a1 (diff)
parent47e2ad8ec37a136851639145579cba34ab973e0d (diff)
downloadpodman-e90d769af34df582edd31f29d6c81acc4256a816.tar.gz
podman-e90d769af34df582edd31f29d6c81acc4256a816.tar.bz2
podman-e90d769af34df582edd31f29d6c81acc4256a816.zip
Merge pull request #3375 from haircommander/json-file-hotfix
Spoof json-file logging support
-rw-r--r--docs/podman-create.1.md2
-rw-r--r--docs/podman-run.1.md2
-rw-r--r--libpod/oci_linux.go4
3 files changed, 5 insertions, 3 deletions
diff --git a/docs/podman-create.1.md b/docs/podman-create.1.md
index 9ab7b201a..b08488d7b 100644
--- a/docs/podman-create.1.md
+++ b/docs/podman-create.1.md
@@ -382,7 +382,7 @@ Not implemented
**--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*
diff --git a/docs/podman-run.1.md b/docs/podman-run.1.md
index c678d2a4c..042a7a561 100644
--- a/docs/podman-run.1.md
+++ b/docs/podman-run.1.md
@@ -395,7 +395,7 @@ Not implemented
**--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*
diff --git a/libpod/oci_linux.go b/libpod/oci_linux.go
index 9bbefdb06..6e84c0759 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()))