From 72add1ba6a5b2c9da2d420eadd09b74261b8fc6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 13 Feb 2023 12:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 76ac6ce..9b7af7a 100644 --- a/client.go +++ b/client.go @@ -297,10 +297,13 @@ func (c *OwnClient) log(ctx *Context, realClient *RealClient, isMaster bool, cmd realClient.Logger.Info( "执行redis命令日志记录", zap.Any(ctx.RequestIDField, ctx.RequestID), // 上下文串联的requestID - zap.String("exec_command", cmdResult.String()), // 执行的命令 + zap.String("instance_flag", ctx.Flag), // redis 实例的标识 + zap.Any("exec_command_name", cmdResult.Name()), // 执行的命令 + zap.Any("exec_command_arg", cmdResult.Args()), // 执行的命令参数 zap.Bool("use_master", isMaster), // 是否使用主节点 zap.Float64("exec_used_time", float64(finishTime-startTime)/1e6), // 耗时,单位: ms zap.Error(cmdResult.Err()), // 异常信息 + zap.String("command_result", cmdResult.String()), // 命令执行后的结果 ) }