From 5fec9584b8ff2e9d435121d19caad29f709ccf3f Mon Sep 17 00:00:00 2001 From: Adrian Lanzafame Date: Tue, 29 Oct 2019 15:58:05 +1000 Subject: [PATCH] remove deprecated log.Warning(f) Part of the work to unblock: https://github.com/ipfs/go-log/pull/65 --- relay.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/relay.go b/relay.go index ee74641..c84ecc3 100644 --- a/relay.go +++ b/relay.go @@ -264,7 +264,7 @@ func (r *Relay) handleNewStream(s network.Stream) { case pb.CircuitRelay_CAN_HOP: r.handleCanHop(s, &msg) default: - log.Warningf("unexpected relay handshake: %d", msg.GetType()) + log.Warnf("unexpected relay handshake: %d", msg.GetType()) r.handleError(s, pb.CircuitRelay_MALFORMED_MESSAGE) } } @@ -280,7 +280,7 @@ func (r *Relay) handleHopStream(s network.Stream, msg *pb.CircuitRelay) { defer atomic.AddInt32(&r.streamCount, -1) if (streamCount + liveHopCount) > int32(HopStreamLimit) { - log.Warning("hop stream limit exceeded; resetting stream") + log.Warn("hop stream limit exceeded; resetting stream") s.Reset() return } @@ -479,7 +479,7 @@ func (r *Relay) handleCanHop(s network.Stream, msg *pb.CircuitRelay) { } func (r *Relay) handleError(s network.Stream, code pb.CircuitRelay_Status) { - log.Warningf("relay error: %s (%d)", pb.CircuitRelay_Status_name[int32(code)], code) + log.Warnf("relay error: %s (%d)", pb.CircuitRelay_Status_name[int32(code)], code) err := r.writeResponse(s, code) if err != nil { s.Reset()