# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1625404313 -7200
# Node ID 46fa1b939e8872abfddf0714cc006e15a2eab7ab
# Parent  c368b4f6ee04bdac8cac7754fec5823a25e030e7
core.loggingmanager: Disable pretty printing when not connected to a tty

Things can behave unexpectedly when fed ANSI escape codes.

diff -r c368b4f6ee04 -r 46fa1b939e88 core/loggingmanager.lua
--- a/core/loggingmanager.lua	Sun Jul 04 15:11:07 2021 +0200
+++ b/core/loggingmanager.lua	Sun Jul 04 15:11:53 2021 +0200
@@ -213,7 +213,7 @@
 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