Commit 185fb6eb authored by Matt Joiner's avatar Matt Joiner

Alter some logging

parent 931ed229
...@@ -282,7 +282,6 @@ func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Mess ...@@ -282,7 +282,6 @@ func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Mess
for _, pi := range closestinfos { for _, pi := range closestinfos {
if len(pi.Addrs) > 0 { if len(pi.Addrs) > 0 {
withAddresses = append(withAddresses, pi) withAddresses = append(withAddresses, pi)
logger.Debugf("handleFindPeer: sending back '%s'", pi.ID)
} }
} }
...@@ -366,7 +365,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M ...@@ -366,7 +365,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M
continue continue
} }
logger.Infof("received provider %s for %s (addrs: %s)", p, c, pi.Addrs) logger.Debugf("received provider %s for %s (addrs: %s)", p, c, pi.Addrs)
if pi.ID != dht.self { // don't add own addrs. if pi.ID != dht.self { // don't add own addrs.
// add the received addresses to our peerstore. // add the received addresses to our peerstore.
dht.peerstore.AddAddrs(pi.ID, pi.Addrs, pstore.ProviderAddrTTL) dht.peerstore.AddAddrs(pi.ID, pi.Addrs, pstore.ProviderAddrTTL)
......
package dht
import "log"
func init() {
log.SetFlags(log.Flags() | log.Llongfile)
}
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