Skip to content

Commit

Permalink
minor adjustment
Browse files Browse the repository at this point in the history
Signed-off-by: Lixia (Sylvia) Lei <[email protected]>
  • Loading branch information
Wwwsylvia committed Dec 6, 2024
1 parent fd687a4 commit 06b314d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions internal/trace/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ func NewLogger(ctx context.Context, debug bool) (context.Context, logrus.FieldLo
}

logger := logrus.New()
// logger.SetFormatter(&logrus.TextFormatter{
// DisableQuote: true,
// FullTimestamp: true,
// DisableLevelTruncation: true,
// ForceColors: true,
// })
logger.SetFormatter(&TextFormatter{})

logger.SetLevel(logLevel)
Expand Down
2 changes: 1 addition & 1 deletion internal/trace/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func logHeader(header http.Header) string {

// TODO: test and docs
func logResponseBody(resp *http.Response) string {
if resp.Body == nil || resp.ContentLength <= 0 || resp.Body == http.NoBody {
if resp.Body == nil || resp.Body == http.NoBody || resp.ContentLength <= 0 {
return ""
}
contentType := resp.Header.Get("Content-Type")
Expand Down

0 comments on commit 06b314d

Please sign in to comment.