mirror of
https://github.com/hibiken/asynq.git
synced 2025-04-22 08:40:22 +08:00
add support for custom redis logger
This commit is contained in:
parent
2884044e75
commit
46912d19c5
7
asynq.go
7
asynq.go
@ -11,6 +11,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
stdlog "log"
|
||||
|
||||
"github.com/go-redis/redis/v7"
|
||||
)
|
||||
|
||||
@ -206,6 +208,11 @@ func parseRedisSentinelURI(u *url.URL) (RedisConnOpt, error) {
|
||||
return RedisFailoverClientOpt{MasterName: master, SentinelAddrs: addrs, Password: password}, nil
|
||||
}
|
||||
|
||||
//SetReditLogger set redit logger
|
||||
func SetReditLogger(logger *stdlog.Logger) {
|
||||
redis.SetLogger(logger)
|
||||
}
|
||||
|
||||
// createRedisClient returns a redis client given a redis connection configuration.
|
||||
//
|
||||
// Passing an unexpected type as a RedisConnOpt argument will cause panic.
|
||||
|
Loading…
x
Reference in New Issue
Block a user