Skip to content

Commit

Permalink
Log issues
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasdinov committed Dec 12, 2022
1 parent e17b0bd commit 727cd07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/es/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ func (a AWSSigningTransport) RoundTrip(req *http.Request) (resp *http.Response,
}

defer func() {
log := logger.NewUPPLogger("INFO", "roundtripper")
log := logger.NewUPPLogger("roundtripper", "INFO")
if err != nil {
log.WithError(err).Error("ERROR")
} else {
log.Info("Is it good?")
}
log.Info("Seems good?")
}()

hasher := sha256.New()
Expand All @@ -60,8 +61,7 @@ func (a AWSSigningTransport) RoundTrip(req *http.Request) (resp *http.Response,
defer req.Body.Close()
}

hasher.Write(payload)
hash := hex.EncodeToString(hasher.Sum(nil))
hash := hex.EncodeToString(hasher.Sum(payload))

err = signer.
NewSigner().
Expand Down

0 comments on commit 727cd07

Please sign in to comment.