committed by
Jakob Borg
parent
d8fa61e27c
commit
e714df013f
22
lib/stun/debug.go
Normal file
22
lib/stun/debug.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2019 The Syncthing Authors.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
package stun
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/syncthing/syncthing/lib/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
l = logger.DefaultLogger.NewFacility("stun", "STUN functionality")
|
||||
)
|
||||
|
||||
func init() {
|
||||
l.SetDebug("stun", strings.Contains(os.Getenv("STTRACE"), "stun") || os.Getenv("STTRACE") == "all")
|
||||
}
|
||||
Reference in New Issue
Block a user