diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-21 01:41:54 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-02-23 18:00:04 +0800 |
commit | 189dee26c6c00074ca8fb3ffd81faaf4bbc6825a (patch) | |
tree | d732d1a152e1a49d21344fc44c74d50b21752dc5 /p2p/peer.go | |
parent | b9d48b4a9300b948362787b90cf3fb7ae77636b4 (diff) | |
download | go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.tar go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.tar.gz go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.tar.bz2 go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.tar.lz go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.tar.xz go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.tar.zst go-tangerine-189dee26c6c00074ca8fb3ffd81faaf4bbc6825a.zip |
p2p: remove trailing newlines from log messages
Diffstat (limited to 'p2p/peer.go')
-rw-r--r-- | p2p/peer.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/p2p/peer.go b/p2p/peer.go index b9d6c099d..b21c872d6 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -157,27 +157,27 @@ loop: // A write finished. Allow the next write to start if // there was no error. if err != nil { - glog.V(logger.Detail).Infof("%v: write error: %v\n", p, err) + glog.V(logger.Detail).Infof("%v: write error: %v", p, err) reason = DiscNetworkError break loop } writeStart <- struct{}{} case err := <-readErr: if r, ok := err.(DiscReason); ok { - glog.V(logger.Debug).Infof("%v: remote requested disconnect: %v\n", p, r) + glog.V(logger.Debug).Infof("%v: remote requested disconnect: %v", p, r) requested = true reason = r } else { - glog.V(logger.Detail).Infof("%v: read error: %v\n", p, err) + glog.V(logger.Detail).Infof("%v: read error: %v", p, err) reason = DiscNetworkError } break loop case err := <-p.protoErr: reason = discReasonForError(err) - glog.V(logger.Debug).Infof("%v: protocol error: %v (%v)\n", p, err, reason) + glog.V(logger.Debug).Infof("%v: protocol error: %v (%v)", p, err, reason) break loop case reason = <-p.disc: - glog.V(logger.Debug).Infof("%v: locally requested disconnect: %v\n", p, reason) + glog.V(logger.Debug).Infof("%v: locally requested disconnect: %v", p, reason) break loop } } @@ -298,14 +298,14 @@ func (p *Peer) startProtocols(writeStart <-chan struct{}, writeErr chan<- error) proto.closed = p.closed proto.wstart = writeStart proto.werr = writeErr - glog.V(logger.Detail).Infof("%v: Starting protocol %s/%d\n", p, proto.Name, proto.Version) + glog.V(logger.Detail).Infof("%v: Starting protocol %s/%d", p, proto.Name, proto.Version) go func() { err := proto.Run(p, proto) if err == nil { - glog.V(logger.Detail).Infof("%v: Protocol %s/%d returned\n", p, proto.Name, proto.Version) + glog.V(logger.Detail).Infof("%v: Protocol %s/%d returned", p, proto.Name, proto.Version) err = errors.New("protocol returned") } else if err != io.EOF { - glog.V(logger.Detail).Infof("%v: Protocol %s/%d error: %v\n", p, proto.Name, proto.Version, err) + glog.V(logger.Detail).Infof("%v: Protocol %s/%d error: %v", p, proto.Name, proto.Version, err) } p.protoErr <- err p.wg.Done() |