Make the use of dynamic Chronicles outputs more optional
This commit is contained in:
parent
f1ea0cec32
commit
831b562435
|
@ -905,12 +905,10 @@ when isMainModule:
|
||||||
randomize()
|
randomize()
|
||||||
let config = BeaconNodeConf.load(version = fullVersionStr())
|
let config = BeaconNodeConf.load(version = fullVersionStr())
|
||||||
|
|
||||||
doAssert defaultChroniclesStream.outputs.len > 0
|
when compiles(defaultChroniclesStream.output.writer):
|
||||||
doAssert defaultChroniclesStream.output is DynamicOutput
|
defaultChroniclesStream.output.writer =
|
||||||
|
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
|
||||||
defaultChroniclesStream.output.writer =
|
stdout.write(msg)
|
||||||
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
|
|
||||||
stdout.write(msg)
|
|
||||||
|
|
||||||
if config.logLevel != LogLevel.NONE:
|
if config.logLevel != LogLevel.NONE:
|
||||||
setLogLevel(config.logLevel)
|
setLogLevel(config.logLevel)
|
||||||
|
|
Loading…
Reference in New Issue