From 29cff9ff48c442218e8be3aebafe16cfe7b3b858 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Tue, 20 Jan 2015 15:52:30 -0800 Subject: [PATCH] updated dialing logs --- p2p/switch.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p2p/switch.go b/p2p/switch.go index 2a804ae8f..b2d3ad3eb 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -137,17 +137,20 @@ func (sw *Switch) DialPeerWithAddress(addr *NetAddress) (*Peer, error) { return nil, ErrSwitchStopped } - log.Info("Dialing peer", "address", addr) + log.Debug("Dialing address", "address", addr) sw.dialing.Set(addr.String(), addr) conn, err := addr.DialTimeout(peerDialTimeoutSeconds * time.Second) sw.dialing.Delete(addr.String()) if err != nil { + log.Debug("Failed dialing address", "address", addr, "error", err) return nil, err } peer, err := sw.AddPeerWithConnection(conn, true) if err != nil { + log.Debug("Failed adding peer", "address", addr, "conn", conn, "error", err) return nil, err } + log.Info("Dialed and added peer", "address", addr, "peer", peer) return peer, nil }