支持设置日志扩展字段

This commit is contained in:
2024-06-21 18:48:06 +08:00
parent 9daae92046
commit c315db9a8a
2 changed files with 15 additions and 4 deletions

View File

@ -25,7 +25,7 @@ type IRedisClient interface {
GetRealClientWithError(instanceFlag string) (*redis.Client, error) // 获取带error的客户端连接
AddClient(instanceFlag string, instanceConfig *define.Options) error // 添加新的客户端连接
RemoveClient(instanceFlag string) // 移除一个客户端连接
SetLogger(loggerInstance *zap.Logger) // 设置日志实例, 全局生效, 而非针对某一个实例
SetLogger(loggerInstance *zap.Logger, extraLogFieldList []string) // 设置日志实例, 全局生效, 而非针对某一个实例
Exec(ctx context.Context, instanceFlag string, command string, args ...any) *define.RedisResult // 执行任意命令
SetCommandWhiteList(command []string) // 设置命令的白名单,全局生效, 而非单独针对某一个实例
}