From 840a76915e1938a0584d52deaaad1f13c4711de2 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Thu, 20 Aug 2020 16:53:28 +0900 Subject: [PATCH] warn -> debug log levels in errors.nim --- libp2p/errors.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libp2p/errors.nim b/libp2p/errors.nim index a7cf0ea..6054253 100644 --- a/libp2p/errors.nim +++ b/libp2p/errors.nim @@ -19,7 +19,7 @@ macro checkFutures*[T](futs: seq[Future[T]], exclude: untyped = []): untyped = if res.failed: let exc = res.readError() # We still don't abort but warn - warn "A future has failed, enable trace logging for details", error = exc.name + debug "A future has failed, enable trace logging for details", error = exc.name trace "Exception message", msg= exc.msg, stack = getStackTrace() else: quote do: @@ -32,7 +32,7 @@ macro checkFutures*[T](futs: seq[Future[T]], exclude: untyped = []): untyped = trace "A future has failed", error=exc.name, msg=exc.msg break check # We still don't abort but warn - warn "A future has failed, enable trace logging for details", error=exc.name + debug "A future has failed, enable trace logging for details", error=exc.name trace "Exception details", msg=exc.msg proc allFuturesThrowing*[T](args: varargs[Future[T]]): Future[void] = @@ -63,5 +63,5 @@ template tryAndWarn*(message: static[string]; body: untyped): untyped = except CancelledError as exc: raise exc except CatchableError as exc: - warn "An exception has ocurred, enable trace logging for details", name = exc.name, msg = message + debug "An exception has ocurred, enable trace logging for details", name = exc.name, msg = message trace "Exception details", exc = exc.msg