mirror of https://github.com/ginuerzh/gost
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
340 B
24 lines
340 B
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...)
|
|
}
|
|
}
|
|
|