Skip to content

Fix network data logging - #2248

Merged
alexeykiselev merged 2 commits into
masterfrom
fix-network-data-logging
Oct 1, 2026
Merged

alexeykiselev merged 2 commits into
masterfrom
fix-network-data-logging

Conversation

@alexeykiselev

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused logging change is correct, consistently applied, and adequately tested.

Review effort: Balanced
Findings: None

What changed in this PR

Adds lazy Base64 encoding for network payload logs, avoiding unnecessary encoding when debug logging is disabled.

Changes:

  • Introduces logging.Data for lazy Base64 formatting.
  • Updates peer and networking logs to use structured attributes.
  • Adds text/JSON tests and a discarded-log benchmark.
File Description
pkg/​p2p/​peer/​peer_impl.go Updates outgoing peer data logging.
pkg/​p2p/​peer/​handle.go Updates incoming peer data logging.
pkg/​networking/​session.go Uses lazy payload encoding in session logs.
pkg/​logging/​logging.go Adds the Data logging attribute helper.
pkg/​logging/​logging_internal_test.go Tests and benchmarks the helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@alexeykiselev alexeykiselev added the run-itests Set this label to start the integration tests for the PR, it is removed automatically. label Oct 1, 2026
@github-actions github-actions Bot removed the run-itests Set this label to start the integration tests for the PR, it is removed automatically. label Oct 1, 2026
@alexeykiselev
alexeykiselev merged commit fc8acb0 into master Oct 1, 2026
20 of 21 checks passed
@alexeykiselev
alexeykiselev deleted the fix-network-data-logging branch October 1, 2026 12:22

This branch was successfully deployed

1 active deployment
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.

2 participants