aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-04-03 08:20:44 +0800
committerFelix Lange <fjl@twurst.com>2015-04-10 19:26:27 +0800
commit7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b (patch)
tree01c62ffa914ad26d1cd2177a26f014d01b42257a
parent9cd8c96157728b8e2eb98a5c506abfc543b6e166 (diff)
downloaddexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.tar
dexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.tar.gz
dexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.tar.bz2
dexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.tar.lz
dexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.tar.xz
dexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.tar.zst
dexon-7be05b4b9d9f2f724cbdfa7b79c10f1c25cbdb4b.zip
p2p/discover: don't log packet content
-rw-r--r--p2p/discover/udp.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go
index 3275cf128..d37260e7d 100644
--- a/p2p/discover/udp.go
+++ b/p2p/discover/udp.go
@@ -335,7 +335,7 @@ func (t *udp) send(toaddr *net.UDPAddr, ptype byte, req interface{}) error {
if err != nil {
return err
}
- glog.V(logger.Detail).Infof(">>> %v %T %v\n", toaddr, req, req)
+ glog.V(logger.Detail).Infof(">>> %v %T\n", toaddr, req)
if _, err = t.conn.WriteToUDP(packet, toaddr); err != nil {
glog.V(logger.Detail).Infoln("UDP send failed:", err)
}
@@ -378,10 +378,11 @@ func (t *udp) readLoop() {
glog.V(logger.Debug).Infof("Bad packet from %v: %v\n", from, err)
continue
}
- glog.V(logger.Detail).Infof("<<< %v %T %v\n", from, packet, packet)
+ status := "ok"
if err := packet.handle(t, from, fromID, hash); err != nil {
- glog.V(logger.Debug).Infof("error handling %T from %v: %v", packet, from, err)
+ status = err.Error()
}
+ glog.V(logger.Detail).Infof("<<< %v %T: %s\n", from, packet, status)
}
}