From d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 22 Feb 2017 14:10:07 +0200 Subject: all: blidly swap out glog to our log15, logs need rework --- whisper/whisperv5/peer.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'whisper/whisperv5/peer.go') 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 } -- cgit v1.2.3