flush stdout logs (#2669)

else pipes end up not getting log output until much later
This commit is contained in:
Jacek Sieka 2021-06-29 15:53:36 +02:00 committed by GitHub
parent 60f601e4e6
commit cc8f7c26a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ proc setupStdoutLogging*(logLevel: string) =
proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe, raises: [Defect].} = proc (logLevel: LogLevel, msg: LogOutputStr) {.gcsafe, raises: [Defect].} =
try: try:
stdout.write(msg) stdout.write(msg)
stdout.flushFile()
except IOError as err: except IOError as err:
logLoggingFailure(cstring(msg), err) logLoggingFailure(cstring(msg), err)