Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: categorize log messages more accurately (backport #245) #272

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading