Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: log peer id as string not object #514

Merged
merged 1 commit into from
Apr 23, 2024
Merged

fix: log peer id as string not object #514

merged 1 commit into from
Apr 23, 2024

Conversation

achingbrain
Copy link
Member

So we aren't logging buffers etc, log the peer id as a string when lookup fails.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

So we aren't logging buffers etc, log the peer id as a string when
lookup fails.
@achingbrain achingbrain requested a review from a team as a code owner April 22, 2024 16:42
@achingbrain achingbrain merged commit f6bcbd4 into main Apr 23, 2024
18 checks passed
@achingbrain achingbrain deleted the fix/log-peer-id branch April 23, 2024 06:40
@achingbrain achingbrain mentioned this pull request Apr 23, 2024
@@ -89,15 +89,15 @@ export class Routing implements RoutingInterface, Startable {

return provider
} catch (err) {
this.log.error('could not load multiaddrs for peer', peer.id, err)
this.log.error('could not load multiaddrs for peer %p', peer.id, err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the %p substitution?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom libp2p logger formatter. Libp2p has a number of these for multiaddr, cid, peerid, etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants