Skip to content

Commit

Permalink
feat: add directional hints for debug logs
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <[email protected]>
  • Loading branch information
qweeah committed Dec 6, 2022
1 parent b89736e commit 0015ef2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/trace/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
ctx := req.Context()
e := Logger(ctx)

e.Debugf(" Request URL: %q", req.URL)
e.Debugf(" Request method: %q", req.Method)
e.Debugf(" Request headers:")
e.Debugf("> Request URL: %q", req.URL)
e.Debugf("> Request method: %q", req.Method)
e.Debugf("> Request headers:")
logHeader(req.Header, e)

resp, err = t.RoundTripper.RoundTrip(req)
Expand All @@ -48,8 +48,8 @@ func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error
} else if resp == nil {
e.Errorf("No response obtained for request %s %q", req.Method, req.URL)
} else {
e.Debugf(" Response Status: %q", resp.Status)
e.Debugf(" Response headers:")
e.Debugf("< Response Status: %q", resp.Status)
e.Debugf("< Response headers:")
logHeader(resp.Header, e)
}
return resp, err
Expand Down

0 comments on commit 0015ef2

Please sign in to comment.