diff --git a/lib/core/redis/redis.go b/lib/core/redis/redis.go index 69fc3579..d4597780 100644 --- a/lib/core/redis/redis.go +++ b/lib/core/redis/redis.go @@ -46,9 +46,10 @@ func Connect() { // 测试数据库连接 pong, err := rdb.Ping(ctx).Result() if err != nil { - log.Fatalf("failed error ping redis %s is %v", client["host"], err) + log.Fatalf("failed error ping redis %s %d is %v", client["host"], client["db"], err) + continue } - log.Infof("redis %s %s connection is successful.", client["host"], pong) + log.Infof("redis %s %d %s connection is successful.", client["host"], client["db"], pong) rdbMap[k] = rdb } }