aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv2/peer.go
diff options
context:
space:
mode:
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
}