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 ];
|
:local Exit [ :tostr $4 ];
|
||||||
|
|
||||||
:global PrintDebug;
|
:global PrintDebug;
|
||||||
|
:global PrintDebugOverride;
|
||||||
|
|
||||||
|
:global EitherOr;
|
||||||
|
|
||||||
|
:local Debug [ $EitherOr ($PrintDebugOverride->$Name) $PrintDebug ];
|
||||||
|
|
||||||
:local PrintSeverity do={
|
:local PrintSeverity do={
|
||||||
:global TerminalColorOutput;
|
:global TerminalColorOutput;
|
||||||
@ -511,7 +516,7 @@
|
|||||||
:set Severity "warning";
|
:set Severity "warning";
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($Severity != "debug" || $PrintDebug = true) do={
|
:if ($Severity != "debug" || $Debug = true) do={
|
||||||
:if ($Exit = "true") do={
|
:if ($Exit = "true") do={
|
||||||
:error ([ $PrintSeverity $Severity ] . ": " . $Message);
|
:error ([ $PrintSeverity $Severity ] . ": " . $Message);
|
||||||
} else={
|
} else={
|
||||||
|
Reference in New Issue
Block a user