debug logging

This commit is contained in:
Dmitriy Ryajov 2019-09-08 00:32:57 -06:00
parent 997745b7e7
commit 54d740949e
1 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,8 @@ import chronos
import connection, import connection,
varint, varint,
vbuffer, vbuffer,
protocols/protocol protocols/protocol,
helpers/debug
const MsgSize* = 64*1024 const MsgSize* = 64*1024
const Codec* = "/multistream/1.0.0" const Codec* = "/multistream/1.0.0"
@ -125,7 +126,7 @@ proc handle*(m: MultisteamSelect, conn: Connection) {.async, gcsafe.} =
await h.protocol.handler(conn, ms) await h.protocol.handler(conn, ms)
break main break main
except Exception as exc: except Exception as exc:
echo exc.msg # TODO: Logging debug exc.msg # TODO: Logging
await conn.write(m.na) await conn.write(m.na)
proc addHandler*[T: LPProtocol](m: MultisteamSelect, proc addHandler*[T: LPProtocol](m: MultisteamSelect,