nimsuggest: only log when logging is enabled (#10646)

fixes #6199
This commit is contained in:
alaviss 2019-02-12 14:17:39 +07:00 • committed by Andreas Rumpf
commit cf5812aa9f

View file

@ -520,7 +520,7 @@ proc mainCommand(graph: ModuleGraph) =
# do not stop after the first error: # do not stop after the first error:
conf.errorMax = high(int) conf.errorMax = high(int)
# do not print errors, but log them # do not print errors, but log them
conf.writelnHook = proc (s: string) = log(s) conf.writelnHook = myLog
conf.structuredErrorHook = nil conf.structuredErrorHook = nil
# compile the project before showing any input so that we already # compile the project before showing any input so that we already
@ -661,7 +661,7 @@ else:
# do not stop after the first error: # do not stop after the first error:
conf.errorMax = high(int) conf.errorMax = high(int)
# do not print errors, but log them # do not print errors, but log them
conf.writelnHook = proc (s: string) = log(s) conf.writelnHook = myLog
conf.structuredErrorHook = nil conf.structuredErrorHook = nil
# compile the project before showing any input so that we already # compile the project before showing any input so that we already