From d5ead5a485529967d118f0ba51a1bf701dd55be0 Mon Sep 17 00:00:00 2001 From: ryanbajollari <54822716+rbajollari@users.noreply.github.com> Date: Fri, 15 Sep 2023 16:03:00 -0400 Subject: [PATCH] chore: categorize log messages more accurately (#245) * go through log messages * pr comments --------- Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com> --- oracle/oracle.go | 4 ++-- oracle/provider/available_pairs.go | 2 +- oracle/provider/polygon.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/oracle/oracle.go b/oracle/oracle.go index 940c3510..96de55fd 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -244,7 +244,7 @@ func (o *Oracle) SetPrices(ctx context.Context) error { } if err := g.Wait(); err != nil { - o.logger.Info().Err(err).Msg("failed to get prices from provider") + o.logger.Error().Err(err).Msg("failed to get prices from provider") } computedPrices, err := o.GetComputedPrices( @@ -257,7 +257,7 @@ func (o *Oracle) SetPrices(ctx context.Context) error { for cp := range requiredRates { if _, ok := computedPrices[cp]; !ok { - o.logger.Warn().Str("asset", cp.String()).Msg("unable to report price for expected asset") + o.logger.Error().Str("asset", cp.String()).Msg("unable to report price for expected asset") } } diff --git a/oracle/provider/available_pairs.go b/oracle/provider/available_pairs.go index f6dc8e99..ceaab69a 100644 --- a/oracle/provider/available_pairs.go +++ b/oracle/provider/available_pairs.go @@ -29,7 +29,7 @@ func ConfirmPairAvailability( confirmedPairs := []types.CurrencyPair{} for _, cp := range cps { if _, ok := availablePairs[strings.ToUpper(cp.String())]; !ok { - logger.Warn().Msg(fmt.Sprintf( + logger.Error().Msg(fmt.Sprintf( "%s not an available pair to be subscribed to in %v, %v ignoring pair", cp.String(), providerName, diff --git a/oracle/provider/polygon.go b/oracle/provider/polygon.go index 194fb9b6..8ed4eb5d 100644 --- a/oracle/provider/polygon.go +++ b/oracle/provider/polygon.go @@ -240,7 +240,7 @@ func (p *PolygonProvider) messageReceived(messageType int, _ *WebsocketConnectio statusErr = json.Unmarshal(bz, &statusResp) if statusResp[0].EV == polygonStatusEvent { - p.logger.Info().Str("status msg received: ", statusResp[0].Message) + p.logger.Debug().Str("status msg received: ", statusResp[0].Message) return }