summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/options.go2
-rw-r--r--libpod/runtime.go7
2 files changed, 5 insertions, 4 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 1137d228f..5cf7609e9 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -500,8 +500,6 @@ func WithEventsLogger(logger string) RuntimeOption {
}
rt.config.Engine.EventsLogger = logger
- rt.config.Engine.EventsLogFilePath = filepath.Join(rt.config.Engine.TmpDir, "events", "events.log")
-
return nil
}
}
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 5a86cc993..077fce999 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -169,7 +169,6 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (*Runtime, error)
if err != nil {
return nil, err
}
- conf.CheckCgroupsAndAdjustConfig()
return newRuntimeFromConfig(ctx, conf, options...)
}
@@ -227,6 +226,8 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R
return nil, err
}
+ runtime.config.CheckCgroupsAndAdjustConfig()
+
return runtime, nil
}
@@ -1078,7 +1079,9 @@ func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) {
logrus.Debugf("Overriding tmp dir %q with %q from database", c.TmpDir, dbConfig.LibpodTmp)
}
c.TmpDir = dbConfig.LibpodTmp
- c.EventsLogFilePath = filepath.Join(dbConfig.LibpodTmp, "events", "events.log")
+ if c.EventsLogFilePath == "" {
+ c.EventsLogFilePath = filepath.Join(dbConfig.LibpodTmp, "events", "events.log")
+ }
}
if !r.storageSet.VolumePathSet && dbConfig.VolumePath != "" {