redis/internal/log.go

23 lines
341 B
Go
Raw Normal View History

2016-04-09 14:52:01 +03:00
package internal
import (
"fmt"
"io/ioutil"
"log"
)
var Debug bool
var Logger = log.New(ioutil.Discard, "redis: ", log.LstdFlags)
func Debugf(s string, args ...interface{}) {
if !Debug {
return
}
Logger.Output(2, fmt.Sprintf(s, args...))
}
func Logf(s string, args ...interface{}) {
Logger.Output(2, fmt.Sprintf(s, args...))
}