From 32b74c5d1cfb368a9dc7f6e3b449f8589ef8752a Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 11 Sep 2019 15:06:10 -0600 Subject: [PATCH] add logging context --- libp2p/multistream.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libp2p/multistream.nim b/libp2p/multistream.nim index 6d3bcdf..7c21466 100644 --- a/libp2p/multistream.nim +++ b/libp2p/multistream.nim @@ -14,6 +14,9 @@ import connection, vbuffer, protocols/protocol +logScope: + topic = "Multistream" + const MsgSize* = 64*1024 const Codec* = "/multistream/1.0.0" const MSCodec* = "\x13" & Codec & "\n" @@ -140,7 +143,7 @@ proc handle*(m: MultisteamSelect, conn: Connection) {.async, gcsafe.} = await h.protocol.handler(conn, ms) break main except Exception as exc: - debug "handle: exception while handling ", msg = exc.msg # TODO: Logging + debug "handle: exception while handling ", msg = exc.msg debug "handle: no handlers for ", protocol = ms await conn.write(m.na)