From 7c9e5c2f7a1804bed2d74c4b159b09783fd6aee8 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Sat, 30 May 2020 23:47:56 +0900 Subject: [PATCH] "Could not write to connection" message split between trace and debug due to log size --- libp2p/muxers/mplex/coder.nim | 3 ++- libp2p/protocols/secure/noise.nim | 3 ++- libp2p/protocols/secure/secio.nim | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libp2p/muxers/mplex/coder.nim b/libp2p/muxers/mplex/coder.nim index 95a70fe48..a100cb421 100644 --- a/libp2p/muxers/mplex/coder.nim +++ b/libp2p/muxers/mplex/coder.nim @@ -77,7 +77,8 @@ proc writeMsg*(conn: Connection, # TODO these exceptions are ignored since it's likely that if writes are # are failing, the underlying connection is already closed - this needs # more cleanup though - debug "Could not write to connection", msg = exc.msg + debug "Could not write to connection", error = exc.name + trace "Could not write to connection - verbose", msg = exc.msg proc writeMsg*(conn: Connection, id: uint64, diff --git a/libp2p/protocols/secure/noise.nim b/libp2p/protocols/secure/noise.nim index cfb46e61e..aef219154 100644 --- a/libp2p/protocols/secure/noise.nim +++ b/libp2p/protocols/secure/noise.nim @@ -463,7 +463,8 @@ method write*(sconn: NoiseConnection, message: seq[byte]): Future[void] {.async. # TODO these exceptions are ignored since it's likely that if writes are # are failing, the underlying connection is already closed - this needs # more cleanup though - debug "Could not write to connection", msg = exc.msg + debug "Could not write to connection", error = exc.name + trace "Could not write to connection - verbose", msg = exc.msg method handshake*(p: Noise, conn: Connection, initiator: bool = false): Future[SecureConn] {.async.} = trace "Starting Noise handshake", initiator diff --git a/libp2p/protocols/secure/secio.nim b/libp2p/protocols/secure/secio.nim index d5fa7421a..b5ca97906 100644 --- a/libp2p/protocols/secure/secio.nim +++ b/libp2p/protocols/secure/secio.nim @@ -244,7 +244,8 @@ method write*(sconn: SecioConn, message: seq[byte]) {.async.} = # TODO these exceptions are ignored since it's likely that if writes are # are failing, the underlying connection is already closed - this needs # more cleanup though - debug "Could not write to connection", msg = exc.msg + debug "Could not write to connection", error = exc.name + trace "Could not write to connection - verbose", msg = exc.msg proc newSecioConn(conn: Connection, hash: string,