summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-08-04 15:24:29 -0400
committerNalin Dahyabhai <nalin@redhat.com>2021-08-23 17:59:42 -0400
commit6b06e9b77c8191096eeb82ac54c59b894f87da8c (patch)
treefc41fbf93803440eedd99d34d1a60c00110ce5c2 /libpod/runtime_ctr.go
parentd1137664fe799bb9ca84ed9e4e0d01db6df77bad (diff)
downloadpodman-6b06e9b77c8191096eeb82ac54c59b894f87da8c.tar.gz
podman-6b06e9b77c8191096eeb82ac54c59b894f87da8c.tar.bz2
podman-6b06e9b77c8191096eeb82ac54c59b894f87da8c.zip
Switch eventlogger to journald by default
[NO TESTS NEEDED] Since we are just testing the default. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 02bbb6981..52072b0f3 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -462,8 +462,15 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
ctrNamedVolumes = append(ctrNamedVolumes, newVol)
}
- if ctr.config.LogPath == "" && ctr.config.LogDriver != define.JournaldLogging && ctr.config.LogDriver != define.NoLogging {
- ctr.config.LogPath = filepath.Join(ctr.config.StaticDir, "ctr.log")
+ switch ctr.config.LogDriver {
+ case define.NoLogging:
+ break
+ case define.JournaldLogging:
+ ctr.initializeJournal(ctx)
+ default:
+ if ctr.config.LogPath == "" {
+ ctr.config.LogPath = filepath.Join(ctr.config.StaticDir, "ctr.log")
+ }
}
if !MountExists(ctr.config.Spec.Mounts, "/dev/shm") && ctr.config.ShmDir == "" {