2015-01-13 13:31:14 +01:00
|
|
|
// Copyright (C) 2014 The Protocol Authors.
|
2014-09-22 21:42:11 +02:00
|
|
|
|
|
|
|
|
package protocol
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"os"
|
|
|
|
|
"strings"
|
|
|
|
|
|
2015-10-03 17:25:21 +02:00
|
|
|
"github.com/syncthing/syncthing/lib/logger"
|
2014-09-22 21:42:11 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var (
|
2015-10-03 17:25:21 +02:00
|
|
|
l = logger.DefaultLogger.NewFacility("protocol", "The BEP protocol")
|
2014-09-22 21:42:11 +02:00
|
|
|
)
|
2015-10-03 17:25:21 +02:00
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
l.SetDebug("protocol", strings.Contains(os.Getenv("STTRACE"), "protocol") || os.Getenv("STTRACE") == "all")
|
|
|
|
|
}
|