Debug events module

This commit is contained in:
Jakob Borg
2014-07-25 14:50:14 +02:00
parent 0d9dcb2f4f
commit 87c3790fa8
4 changed files with 39 additions and 0 deletions

17
events/debug.go Normal file
View File

@@ -0,0 +1,17 @@
// Copyright (C) 2014 Jakob Borg and Contributors (see the CONTRIBUTORS file).
// All rights reserved. Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
package events
import (
"os"
"strings"
"github.com/calmh/syncthing/logger"
)
var (
debug = strings.Contains(os.Getenv("STTRACE"), "events") || os.Getenv("STTRACE") == "all"
dl = logger.DefaultLogger
)