From cc2767dd3eb23a098cbbfc5a032bd13c40ce92d2 Mon Sep 17 00:00:00 2001 From: Bolek <1416262+bolekk@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:45:10 -0700 Subject: [PATCH] Set FeedID in delegate's logger only if non-zero (#9801) Zero FeedID is polluting logs for all products. --- core/services/ocr2/delegate.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index f8c7b95fa51..7ac7e3b1493 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -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()