From e35cb94a5c1ec17ed55a1a86e17a72d6e8771dde Mon Sep 17 00:00:00 2001 From: chyroc Date: Sat, 1 Jun 2024 09:44:33 +0800 Subject: [PATCH] fix log --- impl_request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/impl_request.go b/impl_request.go index 8dc8414f..820c9ed2 100644 --- a/impl_request.go +++ b/impl_request.go @@ -96,10 +96,10 @@ func (r *Lark) rawRequest(ctx context.Context, req *RawRequestReq, resp interfac switch logLevel { case LogLevelDebug: // [debug]: 详细 error 日志 - r.Log(ctx, LogLevelError, "[lark] %s#%s %s %s failed, log_id=%s, status=%d, body=%s", rawHttpReq.Scope, rawHttpReq.API, rawHttpReq.Method, rawHttpReq.URL, response.LogID, response.StatusCode, respContent) + r.Log(ctx, LogLevelError, "[lark] %s#%s %s %s failed, log_id=%s, status=%d, body=%s, err=%s", rawHttpReq.Scope, rawHttpReq.API, rawHttpReq.Method, rawHttpReq.URL, response.LogID, response.StatusCode, respContent, err) default: // [其他]: 简单 error 日志 - r.Log(ctx, LogLevelError, "[lark] %s#%s %s %s failed, log_id=%s, status=%d", rawHttpReq.Scope, rawHttpReq.API, rawHttpReq.Method, rawHttpReq.URL, response.LogID, response.StatusCode) + r.Log(ctx, LogLevelError, "[lark] %s#%s %s %s failed, log_id=%s, status=%d, err=%s", rawHttpReq.Scope, rawHttpReq.API, rawHttpReq.Method, rawHttpReq.URL, response.LogID, response.StatusCode, err) } return response, err }