mirror of https://github.com/vacp2p/nim-libp2p.git
move some importance trace logs to debug (#428)
This commit is contained in:
parent
331961ef14
commit
90921bff09
|
@ -77,7 +77,7 @@ method unsubscribePeer*(p: PubSub, peerId: PeerID) {.base.} =
|
||||||
## handle peer disconnects
|
## handle peer disconnects
|
||||||
##
|
##
|
||||||
|
|
||||||
trace "unsubscribing pubsub peer", peerId
|
debug "unsubscribing pubsub peer", peerId
|
||||||
p.peers.del(peerId)
|
p.peers.del(peerId)
|
||||||
|
|
||||||
libp2p_pubsub_peers.set(p.peers.len.int64)
|
libp2p_pubsub_peers.set(p.peers.len.int64)
|
||||||
|
@ -149,7 +149,7 @@ proc getOrCreatePeer*(
|
||||||
|
|
||||||
# create new pubsub peer
|
# create new pubsub peer
|
||||||
let pubSubPeer = newPubSubPeer(peer, getConn, onEvent, protos[0])
|
let pubSubPeer = newPubSubPeer(peer, getConn, onEvent, protos[0])
|
||||||
trace "created new pubsub peer", peer
|
debug "created new pubsub peer", peer
|
||||||
|
|
||||||
p.peers[peer] = pubSubPeer
|
p.peers[peer] = pubSubPeer
|
||||||
pubSubPeer.observers = p.observers
|
pubSubPeer.observers = p.observers
|
||||||
|
|
|
@ -124,7 +124,7 @@ method initStream*(s: LPStream) {.base.} =
|
||||||
|
|
||||||
libp2p_open_streams.inc(labelValues = [s.objName, $s.dir])
|
libp2p_open_streams.inc(labelValues = [s.objName, $s.dir])
|
||||||
inc getStreamTracker(s.objName).opened
|
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] =
|
proc join*(s: LPStream): Future[void] =
|
||||||
s.closeEvent.wait()
|
s.closeEvent.wait()
|
||||||
|
@ -253,7 +253,7 @@ method closeImpl*(s: LPStream): Future[void] {.async, base.} =
|
||||||
s.closeEvent.fire()
|
s.closeEvent.fire()
|
||||||
libp2p_open_streams.dec(labelValues = [s.objName, $s.dir])
|
libp2p_open_streams.dec(labelValues = [s.objName, $s.dir])
|
||||||
inc getStreamTracker(s.objName).closed
|
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].}
|
method close*(s: LPStream): Future[void] {.base, async.} = # {.raises [Defect].}
|
||||||
## close the stream - this may block, but will not raise exceptions
|
## close the stream - this may block, but will not raise exceptions
|
||||||
|
|
Loading…
Reference in New Issue