More precise tracing
This commit is contained in:
parent
7bd305471c
commit
1bd933cd5a
|
@ -148,7 +148,7 @@ proc handle*(m: MultisteamSelect, conn: Connection) {.async, gcsafe.} =
|
||||||
warn "no handlers for ", protocol = ms
|
warn "no handlers for ", protocol = ms
|
||||||
await conn.write(m.na)
|
await conn.write(m.na)
|
||||||
except CatchableError as exc:
|
except CatchableError as exc:
|
||||||
trace "exception occured", exc = exc.msg
|
trace "exception occurred in MultistreamSelect.handle", exc = exc.msg
|
||||||
finally:
|
finally:
|
||||||
trace "leaving multistream loop"
|
trace "leaving multistream loop"
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ proc handle*(p: PubSubPeer, conn: Connection) {.async.} =
|
||||||
await p.handler(p, @[msg])
|
await p.handler(p, @[msg])
|
||||||
p.recvdRpcCache.put($hexData.hash)
|
p.recvdRpcCache.put($hexData.hash)
|
||||||
except CatchableError as exc:
|
except CatchableError as exc:
|
||||||
error "exception occured", exc = exc.msg
|
error "exception occurred in PubSubPeer.handle", exc = exc.msg
|
||||||
finally:
|
finally:
|
||||||
trace "exiting pubsub peer read loop", peer = p.id
|
trace "exiting pubsub peer read loop", peer = p.id
|
||||||
if not conn.closed():
|
if not conn.closed():
|
||||||
|
@ -100,7 +100,7 @@ proc send*(p: PubSubPeer, msgs: seq[RPCMsg]) {.async.} =
|
||||||
encoded = encodedHex
|
encoded = encodedHex
|
||||||
|
|
||||||
except CatchableError as exc:
|
except CatchableError as exc:
|
||||||
trace "exception occured", exc = exc.msg
|
trace "exception occurred in PubSubPeer.send", exc = exc.msg
|
||||||
|
|
||||||
proc sendMsg*(p: PubSubPeer,
|
proc sendMsg*(p: PubSubPeer,
|
||||||
peerId: PeerID,
|
peerId: PeerID,
|
||||||
|
|
|
@ -426,7 +426,7 @@ proc readLoop(sconn: SecureConnection, stream: BufferStream) {.async.} =
|
||||||
|
|
||||||
await stream.pushTo(msg)
|
await stream.pushTo(msg)
|
||||||
except CatchableError as exc:
|
except CatchableError as exc:
|
||||||
trace "exception occured", exc = exc.msg
|
trace "exception occurred SecureConnection.readLoop", exc = exc.msg
|
||||||
finally:
|
finally:
|
||||||
if not sconn.closed:
|
if not sconn.closed:
|
||||||
await sconn.close()
|
await sconn.close()
|
||||||
|
|
|
@ -258,7 +258,7 @@ proc start*(s: Switch): Future[seq[Future[void]]] {.async, gcsafe.} =
|
||||||
try:
|
try:
|
||||||
await s.upgradeIncoming(conn) # perform upgrade on incoming connection
|
await s.upgradeIncoming(conn) # perform upgrade on incoming connection
|
||||||
except CatchableError as exc:
|
except CatchableError as exc:
|
||||||
trace "exception occured", exc = exc.msg
|
trace "exception occurred in Switch.start", exc = exc.msg
|
||||||
finally:
|
finally:
|
||||||
if not isNil(conn) and not conn.closed:
|
if not isNil(conn) and not conn.closed:
|
||||||
await conn.close()
|
await conn.close()
|
||||||
|
|
Loading…
Reference in New Issue