Skip to content

Commit 1b0800d

Browse files
committed
Change log level to Warning when showing response payload
1 parent bd5ede4 commit 1b0800d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

internal/httpclnt/httpclnt.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package httpclnt
33
import (
44
"context"
55
"fmt"
6-
"github.com/rs/zerolog/log"
7-
"golang.org/x/oauth2/clientcredentials"
86
"io"
97
"net/http"
108
"time"
9+
10+
"github.com/rs/zerolog/log"
11+
"golang.org/x/oauth2/clientcredentials"
1112
)
1213

1314
type HTTPExecuter struct {
@@ -111,7 +112,7 @@ func (e *HTTPExecuter) LogError(resp *http.Response, callType string) (resBody [
111112
}
112113

113114
if len(resBody) != 0 && e.showLogs {
114-
log.Error().Msgf("Response body = %s", resBody)
115+
log.Warn().Msgf("Response body = %s", resBody)
115116
}
116117

117118
return resBody, fmt.Errorf("%v call failed with response code = %d", callType, resp.StatusCode)

0 commit comments

Comments
 (0)