mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 06:00:45 -06:00
make fatalquit actually use fatal
This commit is contained in:
parent
42e9583808
commit
9ed82c1ae6
1 changed files with 3 additions and 3 deletions
|
@ -94,10 +94,10 @@ method log*(logger: FancyConsoleLogger, level: Level, args: varargs[string, `$`]
|
||||||
|
|
||||||
if level >= logger.levelThreshold:
|
if level >= logger.levelThreshold:
|
||||||
let ln = substituteLog(logger.fmtStrs[level], level, args)
|
let ln = substituteLog(logger.fmtStrs[level], level, args)
|
||||||
when defined(js): {.fatal: "handler does note support JS".}
|
when defined(js): {.fatal: "handler does not support JS".}
|
||||||
try:
|
try:
|
||||||
let handle =
|
let handle =
|
||||||
if logger.useStderr: stderr
|
if logger.useStderr: stderr
|
||||||
else: stdout
|
else: stdout
|
||||||
writeLine(handle, ln)
|
writeLine(handle, ln)
|
||||||
if level >= logger.flushThreshold: flushFile(handle)
|
if level >= logger.flushThreshold: flushFile(handle)
|
||||||
|
@ -112,6 +112,6 @@ template errorQuit*(args: varargs[string, `$`]) =
|
||||||
quit QuitFailure
|
quit QuitFailure
|
||||||
|
|
||||||
template fatalQuit*(args: varargs[string, `$`]) =
|
template fatalQuit*(args: varargs[string, `$`]) =
|
||||||
error args
|
fatal args
|
||||||
quit QuitFailure
|
quit QuitFailure
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue