From 6335b9c801f44d287b2dd31231bf40da583e4afb Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Fri, 7 Jan 2022 16:34:11 -0600 Subject: [PATCH] disable retryablehttp logger because *wow* that's a lot of output --- ctl/restore.go | 3 +++ http/client.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ctl/restore.go b/ctl/restore.go index b7f1fb2dc..9c12434f8 100644 --- a/ctl/restore.go +++ b/ctl/restore.go @@ -19,6 +19,7 @@ import ( pilosa "github.com/molecula/featurebase/v2" fb_http "github.com/molecula/featurebase/v2/http" + "github.com/molecula/featurebase/v2/logger" "github.com/molecula/featurebase/v2/server" "github.com/molecula/featurebase/v2/topology" "github.com/pkg/errors" @@ -203,6 +204,8 @@ func (cmd *RestoreCommand) newClient() *retryablehttp.Client { client.RetryWaitMin = min client.RetryMax = int(attempts) client.CheckRetry = retryWith400 + client.Logger = logger.NopLogger + return client } diff --git a/http/client.go b/http/client.go index 8d3437bb5..e1169034b 100644 --- a/http/client.go +++ b/http/client.go @@ -82,7 +82,9 @@ func WithClientRetryPeriod(period time.Duration) InternalClientOption { rc.RetryWaitMin = min rc.RetryMax = int(attempts) rc.CheckRetry = retryWith400Policy + rc.Logger = logger.NopLogger c.retryableClient = rc + } } @@ -123,6 +125,7 @@ func NewInternalClientFromURI(defaultURI *pnet.URI, remoteClient *http.Client, o rc := retryablehttp.NewClient() rc.HTTPClient = ic.httpClient rc.CheckRetry = noRetryPolicy + rc.Logger = logger.NopLogger ic.retryableClient = rc } return ic