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

chore: optimize debug logging a bit #598

Merged
merged 1 commit into from Apr 21, 2020
Merged

Conversation

Stebalien
Copy link
Member

These are all critical paths so we should try to do as little work as possible.

These are all critical paths so we should try to do as little work as possible.
@@ -138,37 +143,39 @@ func (dht *IpfsDHT) handleNewMessage(s network.Stream) bool {
handler := dht.handlerForMsgType(req.GetType())
if handler == nil {
stats.Record(ctx, metrics.ReceivedMessageErrors.M(1))
logger.Warnw("can't handle received message", "from", mPeer, "type", req.GetType())
Copy link
Member Author

Choose a reason for hiding this comment

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

Reduced log level because we shouldn't warn based on received messages.

@Stebalien Stebalien merged commit 21b38cc into master Apr 21, 2020
@Stebalien Stebalien deleted the fix/optimize-debug-logging branch April 21, 2020 01:08
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.

None yet

2 participants