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

Adjust levels of some p2p logs #366

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion p2p/remotepeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ READNOPLOOP:
}
}

p.logger.Info().Str(p2putil.LogPeerName, p.Name()).Msg("Finishing peer")
p.logger.Debug().Str(p2putil.LogPeerName, p.Name()).Msg("Finishing peer")
txNoticeTicker.Stop()
pingTicker.Stop()
// finish goroutine write. read goroutine will be closed automatically when disconnect
Expand Down
4 changes: 2 additions & 2 deletions p2p/waitpeermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (dpm *basePeerManager) getStream(meta p2pcommon.PeerMeta) (network.Stream,
func (dpm *basePeerManager) tryAddPeer(outbound bool, meta p2pcommon.PeerMeta, s network.Stream, h p2pcommon.HSHandler) (p2pcommon.PeerMeta, bool) {
hResult, err := h.Handle(s, defaultHandshakeTTL)
if err != nil {
dpm.logger.Debug().Err(err).Bool("outbound", outbound).Stringer(p2putil.LogPeerID, types.LogPeerShort(meta.ID)).Msg("Failed to handshake")
dpm.logger.Info().Err(err).Bool("outbound", outbound).Stringer(p2putil.LogPeerID, types.LogPeerShort(meta.ID)).Msg("Failed to handshake")
return meta, false
}

Expand Down Expand Up @@ -254,7 +254,7 @@ func (dpm *basePeerManager) OnWorkDone(result p2pcommon.ConnWorkResult) {
delete(dpm.workingJobs, meta.ID)
wp, ok := dpm.pm.waitingPeers[meta.ID]
if !ok {
dpm.logger.Debug().Str(p2putil.LogPeerName, p2putil.ShortMetaForm(meta)).Err(result.Result).Msg("Connection job finished")
dpm.logger.Info().Str(p2putil.LogPeerName, p2putil.ShortMetaForm(meta)).Err(result.Result).Msg("Connection job finished")
return
} else {
dpm.logger.Debug().Str(p2putil.LogPeerName, p2putil.ShortMetaForm(meta)).Int("trial", wp.TrialCnt).Err(result.Result).Msg("Connection job finished")
Expand Down
Loading