summaryrefslogtreecommitdiff
path: root/libpod/oci_linux.go
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2019-05-18 19:39:11 -0400
committerPeter Hunt <pehunt@redhat.com>2019-05-28 11:10:57 -0400
commitf61fa28d39298def261dded2644b8dcf45366415 (patch)
tree36081cf2a2644264099ffcf32836b8c85f9ddb04 /libpod/oci_linux.go
parent18d7fcb5eb1966c4d3748a50c625c01c1ebd9f5b (diff)
downloadpodman-f61fa28d39298def261dded2644b8dcf45366415.tar.gz
podman-f61fa28d39298def261dded2644b8dcf45366415.tar.bz2
podman-f61fa28d39298def261dded2644b8dcf45366415.zip
Added --log-driver and journald logging
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'libpod/oci_linux.go')
-rw-r--r--libpod/oci_linux.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpod/oci_linux.go b/libpod/oci_linux.go
index 1c1e4a203..b3a21948e 100644
--- a/libpod/oci_linux.go
+++ b/libpod/oci_linux.go
@@ -217,7 +217,6 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
args = append(args, "-r", r.path)
args = append(args, "-b", ctr.bundlePath())
args = append(args, "-p", filepath.Join(ctr.state.RunDir, "pidfile"))
- args = append(args, "-l", ctr.LogPath())
args = append(args, "--exit-dir", r.exitsDir)
if ctr.config.ConmonPidFile != "" {
args = append(args, "--conmon-pidfile", ctr.config.ConmonPidFile)
@@ -237,6 +236,13 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
if r.logSizeMax >= 0 {
args = append(args, "--log-size-max", fmt.Sprintf("%v", r.logSizeMax))
}
+
+ logDriver := "k8s-file"
+ if ctr.LogDriver() != "" {
+ logDriver = ctr.LogDriver()
+ }
+ args = append(args, "-l", fmt.Sprintf("%s:%s", logDriver, ctr.LogPath()))
+
if r.noPivot {
args = append(args, "--no-pivot")
}