mirror of https://github.com/go-redis/redis.git
Merge pull request #325 from go-redis/fix/cleanup-logger
Cleanup loggers.
This commit is contained in:
commit
5a2dda6d40
|
@ -2,21 +2,14 @@ package internal
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
)
|
||||
|
||||
var Debug bool
|
||||
var Logger *log.Logger
|
||||
|
||||
var Logger = log.New(ioutil.Discard, "redis: ", log.LstdFlags)
|
||||
|
||||
func Debugf(s string, args ...interface{}) {
|
||||
if !Debug {
|
||||
func Logf(s string, args ...interface{}) {
|
||||
if Logger == nil {
|
||||
return
|
||||
}
|
||||
Logger.Output(2, fmt.Sprintf(s, args...))
|
||||
}
|
||||
|
||||
func Logf(s string, args ...interface{}) {
|
||||
Logger.Output(2, fmt.Sprintf(s, args...))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue