mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-23 01:58:40 +02:00
global-functions: $LogPrintExit: make colorful output configurable
This commit is contained in:
parent
bbf918e329
commit
b780b40baf
2 changed files with 8 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue