all, lib/logger: Refactor SetDebug calls (#6054)
This commit is contained in:
committed by
Simon Frei
parent
8fb576ed54
commit
96bb1c8e29
@@ -7,9 +7,6 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/logger"
|
||||
)
|
||||
|
||||
@@ -17,10 +14,6 @@ var (
|
||||
l = logger.DefaultLogger.NewFacility("model", "The root hub")
|
||||
)
|
||||
|
||||
func init() {
|
||||
l.SetDebug("model", strings.Contains(os.Getenv("STTRACE"), "model") || os.Getenv("STTRACE") == "all")
|
||||
}
|
||||
|
||||
func shouldDebug() bool {
|
||||
return l.ShouldDebug("model")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user