Skip to content

Commit

Permalink
chore(*): improve few random logs (#1847)
Browse files Browse the repository at this point in the history
Decrease noisy logs, decrease log level if retryable . Add block height
to relayer submit logs.

issue: none
  • Loading branch information
corverroos authored Sep 10, 2024
1 parent d816e96 commit c2e96c6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions lib/cchain/provider/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ func newABCIFetchFunc(cl atypes.QueryClient, client rpcclient.Client, chainNamer
return []xchain.Attestation{}, nil
}

log.Debug(ctx, "Offset not found in latest state", "chain", chainName, "offset", fromOffset, "earliest", earliestAttestationAtLatestHeight.AttestOffset)

offsetHeight, err := searchOffsetInHistory(ctx, client, cl, chainVer, chainName, fromOffset)
if err != nil {
incQueryErr(endpoint)
Expand Down
2 changes: 1 addition & 1 deletion monitor/xfeemngr/gasprice/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (b *Buffer) streamOne(ctx context.Context, chainID uint64) {
callback := func(ctx context.Context) {
gpriceBig, err := pricer.SuggestGasPrice(ctx)
if err != nil {
log.Error(ctx, "Failed to get gas price - will retry", err)
log.Warn(ctx, "Failed to get gas price (will retry)", err)
return
}

Expand Down
2 changes: 1 addition & 1 deletion monitor/xfeemngr/tokenprice/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (b *Buffer) stream(ctx context.Context) {
callback := func(ctx context.Context) {
prices, err := b.pricer.Price(ctx, b.tokens...)
if err != nil {
log.Error(ctx, "Failed to get prices - will retry", err)
log.Warn(ctx, "Failed to get prices (will retry)", err)
return
}

Expand Down
1 change: 1 addition & 0 deletions relayer/app/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func (s Sender) SendTransaction(ctx context.Context, sub xchain.Submission) erro
"valset_id", sub.ValidatorSetID,
"status", rec.Status,
"nonce", tx.Nonce(),
"height", rec.BlockNumber.Uint64(),
"gas_used", rec.GasUsed,
"tx_hash", rec.TxHash,
}
Expand Down

0 comments on commit c2e96c6

Please sign in to comment.