Skip to content

Commit

Permalink
fix(routing/http/contentrouter): switch logging from Warnw -> Warnf w…
Browse files Browse the repository at this point in the history
…here there aren't key pairs
  • Loading branch information
aschmahmann committed Jun 20, 2024
1 parent c7063f6 commit 558123e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routing/http/contentrouter/contentrouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func readProviderResponses(ctx context.Context, iter iter.ResultIter[types.Recor
for iter.Next() {
res := iter.Val()
if res.Err != nil {
logger.Warnw("error iterating provider responses: %s", res.Err)
logger.Warnf("error iterating provider responses: %s", res.Err)

Check warning on line 122 in routing/http/contentrouter/contentrouter.go

View check run for this annotation

Codecov / codecov/patch

routing/http/contentrouter/contentrouter.go#L122

Added line #L122 was not covered by tests
continue
}
v := res.Val
Expand Down Expand Up @@ -200,12 +200,12 @@ func (c *contentRouter) FindPeer(ctx context.Context, pid peer.ID) (peer.AddrInf
for iter.Next() {
res := iter.Val()
if res.Err != nil {
logger.Warnw("error iterating peer responses: %s", res.Err)
logger.Warnf("error iterating peer responses: %s", res.Err)

Check warning on line 203 in routing/http/contentrouter/contentrouter.go

View check run for this annotation

Codecov / codecov/patch

routing/http/contentrouter/contentrouter.go#L203

Added line #L203 was not covered by tests
continue
}

if *res.Val.ID != pid {
logger.Warnw("searched for peerID %s, got response for %s:", pid, *res.Val.ID)
logger.Warnf("searched for peerID %s, got response for %s:", pid, *res.Val.ID)
continue
}

Expand Down

0 comments on commit 558123e

Please sign in to comment.