From 0cd21daa197e3ed449b439f3f8a387998b096857 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 17:37:04 -0400 Subject: [PATCH] Improve Slinky logs to prevent unnecessary logs (#1289) (#1470) (cherry picked from commit fbeeb7c472cdcbb3f0de5595d49abeb9213a24c7) Co-authored-by: Christopher-Li --- protocol/daemons/slinky/client/price_fetcher.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/protocol/daemons/slinky/client/price_fetcher.go b/protocol/daemons/slinky/client/price_fetcher.go index d2258ddd2f..e8f72465de 100644 --- a/protocol/daemons/slinky/client/price_fetcher.go +++ b/protocol/daemons/slinky/client/price_fetcher.go @@ -74,9 +74,6 @@ func (p *PriceFetcherImpl) FetchPrices(ctx context.Context) error { if err != nil { return err } - p.logger.Info("turned price pair to currency pair", - "string", currencyPairString, - "currency pair", currencyPair.String()) // get the market id for the currency pair id, err := p.marketPairFetcher.GetIDForPair(currencyPair) @@ -93,7 +90,11 @@ func (p *PriceFetcherImpl) FetchPrices(ctx context.Context) error { p.logger.Error("slinky client returned a price not parsable as uint64", "price", priceString) continue } - p.logger.Info("parsed update for", "market id", id, "price", price) + p.logger.Debug("Parsed Slinky price update", + "market id", id, + "price", price, + "string", currencyPairString, + "currency pair", currencyPair.String()) // append the update to the list of MarketPriceUpdates to be sent to the app's price-feed service updates = append(updates, &api.MarketPriceUpdate{ @@ -108,6 +109,8 @@ func (p *PriceFetcherImpl) FetchPrices(ctx context.Context) error { }) } + p.logger.Info("Slinky returned valid market price updates", "count", len(updates), "updates", updates) + // send the updates to the indexPriceCache if len(updates) == 0 { p.logger.Info("Slinky returned 0 valid market price updates")