From 287e3ccf35caca98682b2d6cffcf1e043eccb259 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 29 Dec 2022 08:01:12 +0300 Subject: [PATCH] :zap: Log the proxy connection failures better --- internal/connect/hub.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/connect/hub.go b/internal/connect/hub.go index e281cf08f..1bc4f147b 100644 --- a/internal/connect/hub.go +++ b/internal/connect/hub.go @@ -39,9 +39,9 @@ func (connector *Connector) TestConnection(path string) error { retriesLeft := connector.retries for retriesLeft > 0 { if isReachable, err := connector.isReachable(path); err != nil || !isReachable { - log.Debug().Err(err).Msg("Hub is not ready yet!") + log.Debug().Str("url", connector.url).Err(err).Msg("Not ready yet!") } else { - log.Debug().Msg("Connection test to Hub passed successfully.") + log.Debug().Str("url", connector.url).Msg("Connection test passed successfully.") break } retriesLeft -= 1 @@ -49,7 +49,7 @@ func (connector *Connector) TestConnection(path string) error { } if retriesLeft == 0 { - return fmt.Errorf("Couldn't reach the Hub after %d retries!", connector.retries) + return fmt.Errorf("Couldn't reach the URL: %s after %d retries!", connector.url, connector.retries) } return nil }