mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: merge $LogAnd{Error,Put} to $LogPrintExit ...
... and fix logging. Logging with severity from variable (:log $severity ...) is not possible, this is considered a syntax error. Also the 'workaround' with parsing code failed with missing message in log. The reliable code is a lot longer, so merge the two functions to save a lot of duplicate code.
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
#
|
||||
# run scripts on ppp up
|
||||
|
||||
:global LogAndError;
|
||||
:global LogPrintExit;
|
||||
|
||||
:local Interface $interface;
|
||||
|
||||
:if ([ :typeof $Interface ] = "nothing") do={
|
||||
$LogAndError error "This script is supposed to run from ppp on-up script hook.";
|
||||
$LogPrintExit error "This script is supposed to run from ppp on-up script hook." true;
|
||||
}
|
||||
|
||||
:local IntName [ / interface get $Interface name ];
|
||||
|
Reference in New Issue
Block a user