diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-22 20:10:07 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-23 18:16:44 +0800 |
commit | d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (patch) | |
tree | 17c93170551d3eeabe2935de1765f157007f0dc2 /whisper/whisperv5/peer.go | |
parent | 47af53f9aaf9aa7b12cd976eb150ccf3d64da6fd (diff) | |
download | go-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/whisperv5/peer.go')
-rw-r--r-- | whisper/whisperv5/peer.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/whisper/whisperv5/peer.go b/whisper/whisperv5/peer.go index 42394a0a3..e137613f5 100644 --- a/whisper/whisperv5/peer.go +++ b/whisper/whisperv5/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" set "gopkg.in/fatih/set.v0" @@ -56,13 +55,13 @@ func newPeer(host *Whisper, remote *p2p.Peer, rw p2p.MsgReadWriter) *Peer { // into the network. func (p *Peer) start() { go p.update() - glog.V(logger.Debug).Infof("%v: whisper started", p.peer) + log.Debug(fmt.Sprintf("%v: whisper started", p.peer)) } // stop terminates the peer updater, stopping message forwarding to it. func (p *Peer) stop() { close(p.quit) - glog.V(logger.Debug).Infof("%v: whisper stopped", p.peer) + log.Debug(fmt.Sprintf("%v: whisper stopped", p.peer)) } // handshake sends the protocol initiation status message to the remote peer and @@ -111,7 +110,7 @@ func (p *Peer) update() { case <-transmit.C: if err := p.broadcast(); err != nil { - glog.V(logger.Info).Infof("%v: broadcast failed: %v", p.peer, err) + log.Info(fmt.Sprintf("%v: broadcast failed: %v", p.peer, err)) return } @@ -172,7 +171,7 @@ func (p *Peer) broadcast() error { if err := p2p.Send(p.ws, messagesCode, transmit); err != nil { return err } - glog.V(logger.Detail).Infoln(p.peer, "broadcasted", len(transmit), "message(s)") + log.Trace(fmt.Sprint(p.peer, "broadcasted", len(transmit), "message(s)")) return nil } |