core.loggingmanager: Disable pretty printing when not connected to a tty

Things can behave unexpectedly when fed ANSI escape codes.
This commit is contained in:
Kim Alvefur 2021-07-04 15:11:53 +02:00
parent b93398ce79
commit 31eb61f22a

View file

@ -213,7 +213,7 @@ local function log_to_stdout(sink_config)
end
log_sink_types.stdout = log_to_stdout;
local do_pretty_printing = true;
local do_pretty_printing = not have_pposix or pposix.isatty(stdout);
local logstyles, pretty;
if do_pretty_printing then