lib: Consistently set suture logging (#7202)

This commit is contained in:
Simon Frei
2020-12-18 19:44:00 +01:00
committed by GitHub
parent 7919310dc6
commit fa40ccece1
10 changed files with 21 additions and 26 deletions
+1 -4
View File
@@ -99,10 +99,7 @@ func New(cfg config.Wrapper, dbBackend backend.Backend, evLogger events.Logger,
func (a *App) Start() error {
// Create a main service manager. We'll add things to this as we go along.
// We want any logging it does to go through our log system.
spec := util.Spec()
spec.EventHook = func(e suture.Event) {
l.Debugln(e)
}
spec := util.SpecWithDebugLogger(l)
a.mainService = suture.New("main", spec)
// Start the supervisor and wait for it to stop to handle cleanup.