nim-libp2p/tests/stublogger.nim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
407 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
2023-03-01 15:59:44 +00:00
defaultChroniclesStream.outputs[0].writer = noOutput
{.used.}