Skip to content

Commit

Permalink
fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
chyroc committed Jun 1, 2024
1 parent 4bb80eb commit e35cb94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impl_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e35cb94

Please sign in to comment.