Skip to content

Commit 6f4cc8d

Browse files
committed
logging converted to *zap.SugaredLogger
1 parent 6c48c9a commit 6f4cc8d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

httpclient/headers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ package httpclient
44
import (
55
"net/http"
66

7-
"github.com/deploymenttheory/go-api-http-client/logger"
87
"go.uber.org/zap"
98
)
109

1110
// CheckDeprecationHeader checks the response headers for the Deprecation header and logs a warning if present.
12-
func CheckDeprecationHeader(resp *http.Response, log logger.Logger) {
11+
func CheckDeprecationHeader(resp *http.Response, log *zap.SugaredLogger) {
1312
deprecationHeader := resp.Header.Get("Deprecation")
1413
if deprecationHeader != "" {
1514
log.Warn("API endpoint is deprecated",

httpclient/request.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ func (c *Client) executeRequestWithRetries(method, endpoint string, body, out in
171171
if apiErr := response.HandleAPIErrorResponse(resp, log); apiErr != nil {
172172
err = apiErr
173173
}
174-
log.LogError("request_error", method, endpoint, resp.StatusCode, resp.Status, err, statusMessage)
175174
break
176175
}
177176
}
@@ -292,7 +291,6 @@ func (c *Client) doRequest(ctx context.Context, method, endpoint string, body in
292291
// }
293292

294293
// TODO review LogCookies
295-
c.Logger.LogCookies("incoming", req, method, endpoint)
296294

297295
CheckDeprecationHeader(resp, c.Logger)
298296

0 commit comments

Comments
 (0)