aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-01-22 09:20:49 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-01-22 09:22:34 +0100
commitb780b40baf904a0448d1a8e60cc6e3626183120c (patch)
tree0d4bf33caa0fa20d5c3bad91c9fcc88c163866fd /global-functions
parentbbf918e32915d3b7b929ad3ecfff7d51968a9ad4 (diff)
global-functions: $LogPrintExit: make colorful output configurable
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index d66541d..3518e36 100644
--- a/global-functions
+++ b/global-functions
@@ -413,6 +413,12 @@
:global PrintDebug;
:local PrintSeverity do={
+ :global TerminalColorOutput;
+
+ :if ($TerminalColorOutput != true) do={
+ :return $1;
+ }
+
:local Color { debug=96; info=97; warning=93; error=91 };
:return ("\1B[" . $Color->$1 . "m" . $1 . "\1B[0m");
}