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