Change connect/disconnect logs to debug (#7794)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terence tsao 2020-11-12 10:46:51 -08:00 committed by GitHub
parent d1b9f12a1e
commit 52d850f355
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ func (s *Service) AddConnectionHandler(reqFunc func(ctx context.Context, id peer
"direction": conn.Stat().Direction,
"multiAddr": peerMultiaddrString(conn),
"activePeers": len(s.peers.Active()),
}).Info("Peer connected")
}).Debug("Peer connected")
}
// Do not perform handshake on inbound dials.
@ -168,7 +168,7 @@ func (s *Service) AddDisconnectionHandler(handler func(ctx context.Context, id p
s.peers.SetConnectionState(conn.RemotePeer(), peers.PeerDisconnected)
// Only log disconnections if we were fully connected.
if priorState == peers.PeerConnected {
log.WithField("activePeers", len(s.peers.Active())).Info("Peer disconnected")
log.WithField("activePeers", len(s.peers.Active())).Debug("Peer disconnected")
}
}()
},