Skip to content

Commit

Permalink
fix: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Jan 21, 2025
1 parent cc8bea7 commit 57a1a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/http/middleware/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (middleware *Logging) Wrap(next http.Handler) http.Handler {
fields = append(fields, zap.Error(err))
middleware.logger.Error(logMessage, fields...)
} else {
// when there is no response body, we don't want to log it
// when the status code is 400 or >=500, and the response body is not empty.
if badResponseBuffer.Len() != 0 {
fields = append(fields, zap.String("response.body", badResponseBuffer.String()))
}
Expand Down

0 comments on commit 57a1a62

Please sign in to comment.