Skip to content

fix: move noisy peer log lines to Debug level#2782

Open
rootulp wants to merge 1 commit intocelestiaorg:mainfrom
rootulp:rootulp/move-noisy-peer-logs-to-debug
Open

fix: move noisy peer log lines to Debug level#2782
rootulp wants to merge 1 commit intocelestiaorg:mainfrom
rootulp:rootulp/move-noisy-peer-logs-to-debug

Conversation

@rootulp
Copy link
Collaborator

@rootulp rootulp commented Feb 7, 2026

Summary

  • Downgrade 10 noisy peer connection/reconnection/rejection log messages in p2p/switch.go from Info/Error to Debug
  • Downgrade 3 routine peer-discovery log messages in p2p/pex/pex_reactor.go from Info to Debug
  • Reduces log noise for consensus nodes running with default log_level = "info"

Closes #2781

Test plan

  • go build ./... compiles successfully
  • go test ./p2p/pex/... -count=1 passes
  • No tests assert on these log messages so no test changes needed
  • Messages are still visible when running with log_level = "debug"

🤖 Generated with Claude Code

Peer connection, reconnection, and rejection messages dominate logs at
Info level on consensus nodes, obscuring important events. Downgrade
these routine operational messages to Debug in p2p/switch.go and
p2p/pex/pex_reactor.go.

Closes celestiaorg#2781

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

what the reason behind this change? is it to make it easier for validators to read logs?

numToDial = r.Switch.MaxNumOutboundPeers() - (out + dial)
)
r.Logger.Info(
r.Logger.Debug(
Copy link
Member

Choose a reason for hiding this comment

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

I think this should remain info because it gives you an update on the number of peers you have. Otherwise, you need to read a whole lot of debug logs or check the RPC

updatedAddrBook := r.book.GetSelection()
if len(updatedAddrBook) == 0 {
r.Logger.Info("No addresses to dial. Falling back to seeds")
r.Logger.Debug("No addresses to dial. Falling back to seeds")
Copy link
Member

Choose a reason for hiding this comment

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

same, this one shows you early if the persistent peers or your address book are not working as expected

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 logs lines about peer to DEBUG

2 participants