mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $LogPrintExit2: allow origin-specific debug
Add something like this in global-config-overlay: :global PrintDebugOverride { "dhcp-to-dns"=true; }
This commit is contained in:
@ -489,6 +489,11 @@
|
||||
:local Exit [ :tostr $4 ];
|
||||
|
||||
:global PrintDebug;
|
||||
:global PrintDebugOverride;
|
||||
|
||||
:global EitherOr;
|
||||
|
||||
:local Debug [ $EitherOr ($PrintDebugOverride->$Name) $PrintDebug ];
|
||||
|
||||
:local PrintSeverity do={
|
||||
:global TerminalColorOutput;
|
||||
@ -511,7 +516,7 @@
|
||||
:set Severity "warning";
|
||||
}
|
||||
|
||||
:if ($Severity != "debug" || $PrintDebug = true) do={
|
||||
:if ($Severity != "debug" || $Debug = true) do={
|
||||
:if ($Exit = "true") do={
|
||||
:error ([ $PrintSeverity $Severity ] . ": " . $Message);
|
||||
} else={
|
||||
|
Reference in New Issue
Block a user