From 31eb61f22ab37174e239038e44c5d7b40519afec Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 4 Jul 2021 15:11:53 +0200 Subject: core.loggingmanager: Disable pretty printing when not connected to a tty Things can behave unexpectedly when fed ANSI escape codes. --- core/loggingmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua index e4ab32b5..d8e557f9 100644 --- a/core/loggingmanager.lua +++ b/core/loggingmanager.lua @@ -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 -- cgit v1.2.3