Skip to content

Commit

Permalink
Set FeedID in delegate's logger only if non-zero
Browse files Browse the repository at this point in the history
Zero FeedID is polluting logs for all products.
  • Loading branch information
bolekk committed Jul 14, 2023
1 parent 946d87a commit 41cc47d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,13 @@ func (d *Delegate) ServicesForSpec(jb job.Job) ([]job.ServiceCtx, error) {
JobName: jb.Name.ValueOrZero(),

ContractID: spec.ContractID,
FeedID: spec.FeedID,
TransmitterID: transmitterID,
}
lggr := logger.Sugared(d.lggr.Named("OCR2").With(lggrCtx.Args()...))

if spec.FeedID != (common.Hash{}) {
lggrCtx.FeedID = spec.FeedID
spec.RelayConfig["feedID"] = spec.FeedID
}
lggr := logger.Sugared(d.lggr.Named("OCR2").With(lggrCtx.Args()...))

if spec.Relay == relay.EVM {
chainID, err2 := spec.RelayConfig.EVMChainID()
Expand Down

0 comments on commit 41cc47d

Please sign in to comment.