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
@@ -68,11 +68,8 @@ type Lowlevel struct {
}
func NewLowlevel(backend backend.Backend, opts ...Option) *Lowlevel {
spec := util.Spec()
// Only log restarts in debug mode.
spec.EventHook = func(e suture.Event) {
l.Debugln(e)
}
spec := util.SpecWithDebugLogger(l)
db := &Lowlevel{
Supervisor: suture.New("db.Lowlevel", spec),
Backend: backend,