Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
remove deprecated log.Warning(f)
Browse files Browse the repository at this point in the history
Part of the work to unblock: ipfs/go-log#65
  • Loading branch information
lanzafame authored and Stebalien committed Jun 24, 2020
1 parent 94d5b03 commit 5fec958
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand All @@ -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
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 5fec958

Please sign in to comment.