Skip to content

Commit

Permalink
chore: categorize log messages more accurately (#245)
Browse files Browse the repository at this point in the history
* go through log messages

* pr comments

---------

Co-authored-by: Adam Wozniak <[email protected]>
  • Loading branch information
rbajollari and adamewozniak authored Sep 15, 2023
1 parent 63a5e89 commit d5ead5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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")
}
}

Expand Down
2 changes: 1 addition & 1 deletion oracle/provider/available_pairs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion oracle/provider/polygon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit d5ead5a

Please sign in to comment.