debug.go 359 B

123456789101112131415161718
  1. // Copyright (C) 2015 Audrius Butkevicius and Contributors (see the CONTRIBUTORS file).
  2. package client
  3. import (
  4. "os"
  5. "strings"
  6. "github.com/syncthing/syncthing/lib/logger"
  7. )
  8. var (
  9. l = logger.DefaultLogger.NewFacility("relay", "")
  10. )
  11. func init() {
  12. l.SetDebug("relay", strings.Contains(os.Getenv("STTRACE"), "relay") || os.Getenv("STTRACE") == "all")
  13. }