gost_software/vendor/github.com/shadowsocks/shadowsocks-go/shadowsocks/log.go
2017-03-24 11:24:03 +02:00

25 lines
340 B
Go

package shadowsocks
import (
"log"
"os"
)
type DebugLog bool
var Debug DebugLog
var dbgLog = log.New(os.Stdout, "[DEBUG] ", log.Ltime)
func (d DebugLog) Printf(format string, args ...interface{}) {
if d {
dbgLog.Printf(format, args...)
}
}
func (d DebugLog) Println(args ...interface{}) {
if d {
dbgLog.Println(args...)
}
}