Software /
code /
prosody
Diff
core/loggingmanager.lua @ 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 |
parent | 11643:f534eeee1552 |
child | 12247:dcad8940f072 |
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