global: give script or function name in log messages

This commit is contained in:
Christian Hesse 2021-02-22 15:14:10 +01:00
parent b0e52aa2d1
commit f46db91845
46 changed files with 262 additions and 212 deletions

View file

@ -6,15 +6,16 @@
# run scripts on ppp up
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ppp-on-up.md
:local 0 "ppp-on-up";
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global LogPrintExit;
:global LogPrintExit2;
:local Interface $interface;
:if ([ :typeof $Interface ] = "nothing") do={
$LogPrintExit error "This script is supposed to run from ppp on-up script hook." true;
$LogPrintExit2 error $0 ("This script is supposed to run from ppp on-up script hook.") true;
}
:local IntName [ / interface get $Interface name ];