mirror of https://github.com/go-redis/redis.git
Merge pull request #294 from go-redis/fix/disable-logs
Disable logging by default.
This commit is contained in:
commit
ad28227d7f
8
redis.go
8
redis.go
|
@ -2,18 +2,14 @@ package redis // import "gopkg.in/redis.v3"
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"gopkg.in/redis.v3/internal/pool"
|
||||
)
|
||||
|
||||
// Deprecated. Use SetLogger instead.
|
||||
var Logger *log.Logger
|
||||
|
||||
func init() {
|
||||
SetLogger(log.New(os.Stderr, "redis: ", log.LstdFlags))
|
||||
}
|
||||
var Logger = log.New(ioutil.Discard, "redis: ", log.LstdFlags)
|
||||
|
||||
func SetLogger(logger *log.Logger) {
|
||||
Logger = logger
|
||||
|
|
Loading…
Reference in New Issue