nim-libp2p/tests/stublogger.nim

14 lines
400 B
Nim
Raw Normal View History

2023-03-01 15:59:44 +00:00
when not defined(nimscript):
import std/typetraits
import chronicles
2023-03-01 15:59:44 +00:00
when defined(chronicles_runtime_filtering):
setLogLevel(INFO)
2023-03-01 15:59:44 +00:00
when defaultChroniclesStream.outputs.type.arity == 1:
# Hide the json logs, they're just here to check if we compile
proc noOutput(logLevel: LogLevel, msg: LogOutputStr) = discard
defaultChroniclesStream.outputs[0].writer = noOutput
{.used.}