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

Commit

Permalink
Merge pull request #85 from libp2p/fix/remove-deprecated-logging
Browse files Browse the repository at this point in the history
Fix/remove deprecated logging
  • Loading branch information
Stebalien authored Jun 24, 2020
2 parents 94d5b03 + 5fec958 commit a7feae5
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 a7feae5

Please sign in to comment.