From 6f813226f364c4f1e2ccbd1e7f9271732278fe2e Mon Sep 17 00:00:00 2001 From: Patrick Zheng Date: Fri, 11 Oct 2024 11:09:36 +0800 Subject: [PATCH] update Signed-off-by: Patrick Zheng --- internal/trace/transport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/trace/transport.go b/internal/trace/transport.go index b7c64748f..620a2173b 100644 --- a/internal/trace/transport.go +++ b/internal/trace/transport.go @@ -58,7 +58,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error var logs strings.Builder fmt.Fprintf(&logs, "> Request: %q %q\n", req.Method, req.URL) fmt.Fprintln(&logs, "> Request headers:") - fmt.Fprintln(&logs, logHeader(req.Header)) + fmt.Fprint(&logs, logHeader(req.Header)) resp, err = t.RoundTripper.RoundTrip(req) if err != nil { @@ -70,7 +70,7 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error } else { fmt.Fprintf(&logs, "< Response status: %q\n", resp.Status) fmt.Fprintln(&logs, "< Response headers:") - fmt.Fprintln(&logs, logHeader(resp.Header)) + fmt.Fprint(&logs, logHeader(resp.Header)) e.Debug(logs.String()) } return resp, err