mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-24 18:48:37 +02: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:
parent
679917390b
commit
89f8dc7120
1 changed files with 6 additions and 1 deletions
|
@ -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={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue