p2p: fix logspam (#9756)

Since starting off as a wee validator, I've been mystified by the volume of p2p logspam, which often makes it impossible to monitor other tasks. Thus, routine p2p events, have been cast into the land of debug.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed
This commit is contained in:
Jacob Gadikian
2022-11-24 21:30:40 +07:00
committed by GitHub
parent 4af7568f99
commit f7bb0659be

View File

@@ -726,7 +726,7 @@ func (sw *Switch) addOutboundPeerWithConfig(
addr *NetAddress,
cfg *config.P2PConfig,
) error {
sw.Logger.Info("Dialing peer", "address", addr)
sw.Logger.Debug("Dialing peer", "address", addr)
// XXX(xla): Remove the leakage of test concerns in implementation.
if cfg.TestDialFail {
@@ -854,7 +854,7 @@ func (sw *Switch) addPeer(p Peer) error {
reactor.AddPeer(p)
}
sw.Logger.Info("Added peer", "peer", p)
sw.Logger.Debug("Added peer", "peer", p)
return nil
}