diff --git a/protocol/debug.go b/protocol/debug.go new file mode 100644 index 000000000..f1ebaf400 --- /dev/null +++ b/protocol/debug.go @@ -0,0 +1,13 @@ +package protocol + +import ( + "os" + "strings" + + "github.com/calmh/syncthing/logger" +) + +var ( + debug = strings.Contains(os.Getenv("STTRACE"), "protocol") || os.Getenv("STTRACE") == "all" + l = logger.DefaultLogger +)