-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
peer_manager: make some variables log fields
This starts using structured logging a bit, causing log messages to mostly more static strings, and the actual error messages, specific endpoint addresses etc. be log fields. This makes it easier to grep for specific log messages, as well as filter things down for a specific peer. Code-wise, this is mostly a matter of moving from format-strings interpolating various variables to actually putting these in front of the message. Frequently, we can also avoid writing it out explicitly alltogether: In `connect_peer` we already have `endpoint`, so we can ask it for `proto()` and `address()`, and just record it in a span, and it'll be present in all child log messages - as it's somewhere part of the span hierarchy and printed by our log formatters.
- Loading branch information
Showing
1 changed file
with
58 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters