增强日志记录,新增响应数据的详细信息

- 在 eggplant.go 文件中,更新日志记录,新增对响应字符串和解析后的数据的记录,提升调试和问题排查的便利性。
This commit is contained in:
danial
2025-05-05 16:45:15 +08:00
parent ff5a12c65b
commit 435298d2da

View File

@@ -185,7 +185,7 @@ func (c *eggplantProductCode) channelTwo(ctx context.Context, forwardUrl *url.UR
}
err = json.Unmarshal([]byte(resp.String()), &respData)
otelTrace.Logger.WithContext(ctx).Info("返回数据", zap.Any("resp", respData))
otelTrace.Logger.WithContext(ctx).Info("返回数据", zap.Any("resp", resp.String()), zap.Any("respData", respData))
if err != nil {
otelTrace.Logger.WithContext(ctx).Error("json解析失败", zap.Error(err))
return false, "内部数据处理失败", ""