mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add PoolStats.StaleConns and enable logging by default
This commit is contained in:
5
redis.go
5
redis.go
@ -3,6 +3,7 @@ package redis
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/internal"
|
||||
@ -13,6 +14,10 @@ import (
|
||||
// Redis nil reply, .e.g. when key does not exist.
|
||||
const Nil = internal.Nil
|
||||
|
||||
func init() {
|
||||
SetLogger(log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile))
|
||||
}
|
||||
|
||||
func SetLogger(logger *log.Logger) {
|
||||
internal.Logger = logger
|
||||
}
|
||||
|
Reference in New Issue
Block a user