Commit 96a29940 authored by Jeromy's avatar Jeromy

lots of logging

parent ce2404ec
......@@ -135,7 +135,6 @@ func (bs *bitswap) ReceiveMessage(ctx context.Context, p peer.Peer, incoming bsm
peer.Peer, bsmsg.BitSwapMessage) {
log.Debugf("ReceiveMessage from %v", p.Key())
log.Debugf("Message wantlist: %v", incoming.Wantlist())
log.Debugf("Message blockset: %v", incoming.Blocks())
if p == nil {
log.Error("Received message from nil peer!")
......
......@@ -4,6 +4,7 @@ import (
"errors"
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
"github.com/jbenet/go-ipfs/util"
bsmsg "github.com/jbenet/go-ipfs/exchange/bitswap/message"
inet "github.com/jbenet/go-ipfs/net"
......@@ -11,6 +12,8 @@ import (
peer "github.com/jbenet/go-ipfs/peer"
)
var log = util.Logger("net_message_adapter")
// NetMessageAdapter wraps a NetMessage network service
func NetMessageAdapter(s inet.Service, n inet.Network, r Receiver) Adapter {
adapter := impl{
......@@ -60,6 +63,7 @@ func (adapter *impl) HandleMessage(
return nil
}
log.Debugf("Message size: %d", len(outgoing.Data()))
return outgoing
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment