Changeset

11657:46fa1b939e88

core.loggingmanager: Disable pretty printing when not connected to a tty Things can behave unexpectedly when fed ANSI escape codes.
author Kim Alvefur <zash@zash.se>
date Sun, 04 Jul 2021 15:11:53 +0200
parents 11656:c368b4f6ee04
children 11658:36942fa001b4
files core/loggingmanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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