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
@@ -139,10 +139,7 @@ type service struct {
}
func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *tls.Config, discoverer discover.Finder, bepProtocolName string, tlsDefaultCommonName string, evLogger events.Logger) Service {
spec := util.Spec()
spec.EventHook = func(e suture.Event) {
l.Infoln(e)
}
spec := util.SpecWithInfoLogger(l)
service := &service{
Supervisor: suture.New("connections.Service", spec),
connectionStatusHandler: newConnectionStatusHandler(),