Skip to content

Commit

Permalink
Merge pull request ipfs#269 from libp2p/logging-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix authored Feb 19, 2019
2 parents 4d5f601 + 185fb6e commit 52b75dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Mess
for _, pi := range closestinfos {
if len(pi.Addrs) > 0 {
withAddresses = append(withAddresses, pi)
logger.Debugf("handleFindPeer: sending back '%s'", pi.ID)
}
}

Expand Down Expand Up @@ -366,7 +365,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M
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.
// add the received addresses to our peerstore.
dht.peerstore.AddAddrs(pi.ID, pi.Addrs, pstore.ProviderAddrTTL)
Expand Down
7 changes: 7 additions & 0 deletions log_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package dht

import "log"

func init() {
log.SetFlags(log.Flags() | log.Llongfile)
}

0 comments on commit 52b75dd

Please sign in to comment.