lib/logger: Reduce API surface (#9404)
There is no need to expose the IsTraced() thing; it's just used in initialisation, and thereafter ShouldDebug() is the corresponding correct call.
This commit is contained in:
+1
-11
@@ -10,18 +10,8 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
l = logger.DefaultLogger.NewFacility("api", "REST API")
|
||||
)
|
||||
var l = logger.DefaultLogger.NewFacility("api", "REST API")
|
||||
|
||||
func shouldDebugHTTP() bool {
|
||||
return l.ShouldDebug("api")
|
||||
}
|
||||
|
||||
func init() {
|
||||
// The debug facility was originally named "http", changed in:
|
||||
// https://github.com/syncthing/syncthing/pull/5548
|
||||
if l.IsTraced("http") {
|
||||
l.SetDebug("api", true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user