move some importance trace logs to debug (#428)

This commit is contained in:
Dmitriy Ryajov 2020-11-09 22:14:46 -06:00 committed by GitHub
parent 331961ef14
commit 90921bff09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -77,7 +77,7 @@ method unsubscribePeer*(p: PubSub, peerId: PeerID) {.base.} =
## handle peer disconnects
##
trace "unsubscribing pubsub peer", peerId
debug "unsubscribing pubsub peer", peerId
p.peers.del(peerId)
libp2p_pubsub_peers.set(p.peers.len.int64)
@ -149,7 +149,7 @@ proc getOrCreatePeer*(
# create new pubsub peer
let pubSubPeer = newPubSubPeer(peer, getConn, onEvent, protos[0])
trace "created new pubsub peer", peer
debug "created new pubsub peer", peer
p.peers[peer] = pubSubPeer
pubSubPeer.observers = p.observers
@ -224,7 +224,7 @@ method unsubscribe*(p: PubSub,
topics: seq[TopicPair]) {.base, async.} =
## unsubscribe from a list of ``topic`` strings
for t in topics:
let
let
handler = t.handler
ttopic = t.topic
closureScope:
@ -338,9 +338,9 @@ method validate*(p: PubSub, message: Message): Future[ValidationResult] {.async,
if res != ValidationResult.Accept:
result = res
break
case result
of ValidationResult.Accept:
of ValidationResult.Accept:
libp2p_pubsub_validation_success.inc()
of ValidationResult.Reject:
libp2p_pubsub_validation_failure.inc()
@ -389,7 +389,7 @@ proc init*[PubParams: object | bool](
switch.addPeerEventHandler(peerEventHandler, PeerEvent.Left)
pubsub.initPubSub()
return pubsub

View File

@ -124,7 +124,7 @@ method initStream*(s: LPStream) {.base.} =
libp2p_open_streams.inc(labelValues = [s.objName, $s.dir])
inc getStreamTracker(s.objName).opened
trace "Stream created", s, objName = s.objName, dir = $s.dir
debug "Stream created", s, objName = s.objName, dir = $s.dir
proc join*(s: LPStream): Future[void] =
s.closeEvent.wait()
@ -253,7 +253,7 @@ method closeImpl*(s: LPStream): Future[void] {.async, base.} =
s.closeEvent.fire()
libp2p_open_streams.dec(labelValues = [s.objName, $s.dir])
inc getStreamTracker(s.objName).closed
trace "Closed stream", s, objName = s.objName, dir = $s.dir
debug "Closed stream", s, objName = s.objName, dir = $s.dir
method close*(s: LPStream): Future[void] {.base, async.} = # {.raises [Defect].}
## close the stream - this may block, but will not raise exceptions