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

Shift To Debug Logs #5891

Merged
merged 1 commit into from
May 18, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions beacon-chain/sync/deadlines.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ func setStreamReadDeadline(stream network.Stream, duration time.Duration) {
// libp2p uses the system clock time for determining the deadline so we use
// time.Now() instead of the synchronized roughtime.Now().
if err := stream.SetReadDeadline(time.Now().Add(duration)); err != nil {
log.WithError(err).Error("Failed to set stream deadline")
log.WithError(err).Debug("Failed to set stream deadline")
}
}

func setStreamWriteDeadline(stream network.Stream, duration time.Duration) {
// libp2p uses the system clock time for determining the deadline so we use
// time.Now() instead of the synchronized roughtime.Now().
if err := stream.SetWriteDeadline(time.Now().Add(duration)); err != nil {
log.WithError(err).Error("Failed to set stream deadline")
log.WithError(err).Debug("Failed to set stream deadline")
}
}
2 changes: 1 addition & 1 deletion beacon-chain/sync/rpc_ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (r *Service) pingHandler(ctx context.Context, msg interface{}, stream libp2
go func() {
md, err := r.sendMetaDataRequest(ctx, stream.Conn().RemotePeer())
if err != nil {
log.WithField("peer", stream.Conn().RemotePeer()).WithError(err).Error("Failed to send metadata request")
log.WithField("peer", stream.Conn().RemotePeer()).WithError(err).Debug("Failed to send metadata request")
return
}
// update metadata if there is no error
Expand Down