1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

global-functions: $LogPrintExit: make colorful output configurable

This commit is contained in:
Christian Hesse
2021-01-22 09:20:49 +01:00
parent bbf918e329
commit b780b40baf
2 changed files with 8 additions and 0 deletions

View File

@ -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");
}