Fixes chronicles log output
This commit is contained in:
parent
9433d9f7e0
commit
7da8c043e2
|
@ -9,11 +9,18 @@ import pkg/zip/zipfiles
|
||||||
import pkg/chronos/apps/http/httpclient
|
import pkg/chronos/apps/http/httpclient
|
||||||
import ../../codex/contracts/marketplace
|
import ../../codex/contracts/marketplace
|
||||||
|
|
||||||
## TODO: chronicles is still "Log message not delivered: [Chronicles] A writer was not configured for a dynamic log output device"
|
proc consoleLog(logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
|
||||||
## And I am mildly annoyed by this.
|
try:
|
||||||
defaultChroniclesStream.outputs[0].writer =
|
stdout.write(msg)
|
||||||
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe.} =
|
stdout.flushFile()
|
||||||
echo msg
|
except IOError as err:
|
||||||
|
logLoggingFailure(cstring(msg), err)
|
||||||
|
|
||||||
|
proc noOutput(logLevel: LogLevel, msg: LogOutputStr) = discard
|
||||||
|
|
||||||
|
defaultChroniclesStream.outputs[0].writer = consoleLog
|
||||||
|
defaultChroniclesStream.outputs[1].writer = noOutput
|
||||||
|
defaultChroniclesStream.outputs[2].writer = noOutput
|
||||||
|
|
||||||
proc printHelp() =
|
proc printHelp() =
|
||||||
info "Usage: ./cirdl [circuitPath] [rpcEndpoint] [marketplaceAddress]"
|
info "Usage: ./cirdl [circuitPath] [rpcEndpoint] [marketplaceAddress]"
|
||||||
|
|
Loading…
Reference in New Issue