Skip to content

Commit

Permalink
remove duplicated debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Oct 1, 2024
1 parent 7d782c8 commit e33501b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions engine/common/requester/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,6 @@ func (e *Engine) dispatchRequest() (bool, error) {
}
e.requests[req.Nonce] = req

if e.log.Debug().Enabled() {
e.log.Debug().
Hex("provider", logging.ID(providerID)).
Uint64("nonce", req.Nonce).
Strs("entities", logging.IDs(entityIDs)).
TimeDiff("duration", time.Now(), requestStart).
Msg("entity request sent")
}

// NOTE: we forget about requests after the expiry of the shortest retry time
// from the entities in the list; this means that we purge requests aggressively.
// However, most requests should be responded to on the first attempt and clearing
Expand All @@ -443,11 +434,15 @@ func (e *Engine) dispatchRequest() (bool, error) {
delete(e.requests, req.Nonce)
}()

if e.log.Debug().Enabled() {
e.log.Debug().
Hex("provider", logging.ID(providerID)).
Uint64("nonce", req.Nonce).
Strs("entities", logging.IDs(entityIDs)).
TimeDiff("duration", time.Now(), requestStart).
Msg("entity request sent")
}
e.metrics.MessageSent(e.channel.String(), metrics.MessageEntityRequest)
e.log.Debug().
Uint64("nonce", req.Nonce).
Strs("entity_ids", flow.IdentifierList(req.EntityIDs).Strings()).
Msg("entity request sent")

return true, nil
}
Expand Down

0 comments on commit e33501b

Please sign in to comment.