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

Move to structured logging #258

Merged
merged 5 commits into from
Jul 9, 2024
Merged

Conversation

jmezo
Copy link
Contributor

@jmezo jmezo commented Jun 30, 2024

Description

Changes logging statements from using string formatting to structured logging. Closes #222

Change checklist

  • Self-review
  • [ ] Documentation updates if relevant
  • Tests if relevant

Copy link
Member

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

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

Thank you @jmezo, for this PR! I have left some comments.

Additionally, it would be appreciated if you could update the logging statements to add spaces around =, similar to the following:

discv5/src/handler/mod.rs

Lines 656 to 661 in ec561f2

warn!(
source = %request_call.contact(),
message_nonce = hex::encode(request_call.packet().message_nonce()),
expected_nonce = hex::encode(request_nonce),
"Received a WHOAREYOU from a non expected source."
);

src/handler/mod.rs Outdated Show resolved Hide resolved
src/handler/mod.rs Outdated Show resolved Hide resolved
src/handler/mod.rs Outdated Show resolved Hide resolved
src/service.rs Outdated Show resolved Hide resolved
src/service.rs Outdated Show resolved Hide resolved
src/service.rs Outdated Show resolved Hide resolved
src/service.rs Outdated Show resolved Hide resolved
src/socket/filter/mod.rs Outdated Show resolved Hide resolved
jmezo and others added 2 commits July 3, 2024 20:32
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
@jmezo
Copy link
Contributor Author

jmezo commented Jul 3, 2024

Thanks for the review and suggestions @ackintosh. I added the spaces around = in 4ca08a2.

Let me know if the commits should be squashed, or if there are any other issues.

@jmezo jmezo requested a review from ackintosh July 3, 2024 19:05
src/service.rs Outdated Show resolved Hide resolved
@ackintosh
Copy link
Member

FYI: The clippy errors will be fixed by #259

Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
@jmezo jmezo requested a review from ackintosh July 4, 2024 07:17
Copy link
Member

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@ackintosh ackintosh merged commit 6124b10 into sigp:master Jul 9, 2024
6 checks passed
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.

move discv5 to structured logging
2 participants