aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv2/peer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 20:10:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:44 +0800
commitd4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (patch)
tree17c93170551d3eeabe2935de1765f157007f0dc2 /whisper/whisperv2/peer.go
parent47af53f9aaf9aa7b12cd976eb150ccf3d64da6fd (diff)
downloadgo-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.gz
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.bz2
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.lz
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.xz
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.zst
go-tangerine-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.zip
all: blidly swap out glog to our log15, logs need rework
Diffstat (limited to 'whisper/whisperv2/peer.go')
-rw-r--r--whisper/whisperv2/peer.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/whisper/whisperv2/peer.go b/whisper/whisperv2/peer.go
index f09ce3523..71798408b 100644
--- a/whisper/whisperv2/peer.go
+++ b/whisper/whisperv2/peer.go
@@ -21,8 +21,7 @@ import (
"time"
"github.com/ethereum/go-ethereum/common"
- "github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rlp"
"gopkg.in/fatih/set.v0"
@@ -54,13 +53,13 @@ func newPeer(host *Whisper, remote *p2p.Peer, rw p2p.MsgReadWriter) *peer {
// into the network.
func (self *peer) start() {
go self.update()
- glog.V(logger.Debug).Infof("%v: whisper started", self.peer)
+ log.Debug(fmt.Sprintf("%v: whisper started", self.peer))
}
// stop terminates the peer updater, stopping message forwarding to it.
func (self *peer) stop() {
close(self.quit)
- glog.V(logger.Debug).Infof("%v: whisper stopped", self.peer)
+ log.Debug(fmt.Sprintf("%v: whisper stopped", self.peer))
}
// handshake sends the protocol initiation status message to the remote peer and
@@ -112,7 +111,7 @@ func (self *peer) update() {
case <-transmit.C:
if err := self.broadcast(); err != nil {
- glog.V(logger.Info).Infof("%v: broadcast failed: %v", self.peer, err)
+ log.Info(fmt.Sprintf("%v: broadcast failed: %v", self.peer, err))
return
}
@@ -170,6 +169,6 @@ func (self *peer) broadcast() error {
if err := p2p.Send(self.ws, messagesCode, transmit); err != nil {
return err
}
- glog.V(logger.Detail).Infoln(self.peer, "broadcasted", len(transmit), "message(s)")
+ log.Trace(fmt.Sprint(self.peer, "broadcasted", len(transmit), "message(s)"))
return nil
}