all, lib/logger: Refactor SetDebug calls (#6054)
This commit is contained in:
committed by
Simon Frei
parent
8fb576ed54
commit
96bb1c8e29
@@ -7,16 +7,9 @@
|
||||
package nat
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
l = logger.DefaultLogger.NewFacility("nat", "NAT discovery and port mapping")
|
||||
)
|
||||
|
||||
func init() {
|
||||
l.SetDebug("nat", strings.Contains(os.Getenv("STTRACE"), "nat") || os.Getenv("STTRACE") == "all")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user