Skip to content

Commit

Permalink
[] Lower POST errors to Warning loglevel (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Frédéric Gaudet <[email protected]>
  • Loading branch information
frgaudet authored Sep 15, 2023
1 parent 7f66ca4 commit b0349d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func killGenericEndpoints() {
genericEndpoint = strings.Trim(genericEndpoint, " ")
resp := typhon.NewRequest(context.Background(), "POST", genericEndpoint, nil).Send().Response()
if resp.Error != nil {
log.Errorf("sent POST to '%s', error: %s", genericEndpoint, resp.Error)
log.Warnf("sent POST to '%s', error: %s", genericEndpoint, resp.Error)
continue
} else {
log.Infof("sent POST to '%s', status code: %v", genericEndpoint, resp.StatusCode)
Expand All @@ -139,7 +139,7 @@ func killIstioWithAPI() (int, error) {
url := fmt.Sprintf("%s/quitquitquit", config.IstioQuitAPI)
resp := typhon.NewRequest(context.Background(), "POST", url, nil).Send().Response()
if resp.Error != nil {
log.Errorf("sent POST to '%s', error: %s", url, resp.Error)
log.Warnf("sent POST to '%s', error: %s", url, resp.Error)
return 200, resp.Error
}
log.Infof("sent quitquitquit to Istio, status code: %d", resp.StatusCode)
Expand Down

0 comments on commit b0349d7

Please sign in to comment.