Skip to content

Commit

Permalink
mute httpsched debug logging (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
rboyer authored and jdef committed Nov 3, 2017
1 parent 187acee commit c488712
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/v1/lib/httpcli/httpsched/httpsched.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ func (cli *client) httpDo(ctx context.Context, m encoding.Marshaler, opt ...http
return resp, err
}
if attempt < cli.redirect.MaxAttempts {
log.Println("redirecting to " + redirectErr.newURL)
if debug {
log.Println("redirecting to " + redirectErr.newURL)
}
cli.With(httpcli.Endpoint(redirectErr.newURL))
select {
case <-getBackoff():
Expand Down Expand Up @@ -182,7 +184,9 @@ func (cli *client) redirectHandler() httpcli.Opt {
}
return nil, errNotHTTPCli
}
log.Println("master changed?")
if debug {
log.Println("master changed?")
}
location, ok := buildNewEndpoint(res.Header.Get("Location"), cli.Endpoint())
if !ok {
return nil, errBadLocation
Expand Down

0 comments on commit c488712

Please sign in to comment.