Skip to content

Commit

Permalink
Log request when debug enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Aegyo committed May 8, 2024
1 parent 8f85f43 commit 8a12660
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ func createDeployment(payload DeploymentPayload, cloudID, debug, oauthToken stri
if err != nil {
return err
}
switch debug {
case "debug", "trace", "DEBUG", "TRACE":
out, _ := httputil.DumpRequest(req, true)
outString := string(out)
logrus.WithField("request", outString).Info("request prepared")
}
req.Header.Set("From", "noreply@localhost")
req.Header.Set("Authorization", "Bearer "+oauthToken)
req.Header.Set("Content-Type", "application/json")
Expand Down

0 comments on commit 8a12660

Please sign in to comment.