Skip to content

Commit

Permalink
Merge pull request #6621 from AndriiDiachuk/observer-ignore-invalid-p…
Browse files Browse the repository at this point in the history
…eers

Changed log level not to spam messages
  • Loading branch information
peterargue authored Nov 7, 2024
2 parents 43ee3c5 + ed149a7 commit f44c7fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/observer/node_builder/observer_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ func (builder *ObserverServiceBuilder) InitIDProviders() {

if flowID, err := builder.IDTranslator.GetFlowID(pid); err != nil {
// TODO: this is an instance of "log error and continue with best effort" anti-pattern
builder.Logger.Err(err).Str("peer", p2plogging.PeerId(pid)).Msg("failed to translate to Flow ID")
builder.Logger.Debug().Str("peer", p2plogging.PeerId(pid)).Msg("failed to translate to Flow ID")
} else {
result = append(result, flowID)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func CreatePublicIDTranslatorAndIdentifierProvider(

if flowID, err := idTranslator.GetFlowID(pid); err != nil {
// TODO: this is an instance of "log error and continue with best effort" anti-pattern
logger.Err(err).Str("peer", p2plogging.PeerId(pid)).Msg("failed to translate to Flow ID")
logger.Debug().Str("peer", p2plogging.PeerId(pid)).Msg("failed to translate to Flow ID")
} else {
result = append(result, flowID)
}
Expand Down
2 changes: 1 addition & 1 deletion follower/follower_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ func (builder *FollowerServiceBuilder) InitIDProviders() {

if flowID, err := builder.IDTranslator.GetFlowID(pid); err != nil {
// TODO: this is an instance of "log error and continue with best effort" anti-pattern
builder.Logger.Err(err).Str("peer", p2plogging.PeerId(pid)).Msg("failed to translate to Flow ID")
builder.Logger.Debug().Str("peer", p2plogging.PeerId(pid)).Msg("failed to translate to Flow ID")
} else {
result = append(result, flowID)
}
Expand Down

0 comments on commit f44c7fb

Please sign in to comment.