aboutsummaryrefslogtreecommitdiffstats
path: root/ppp-on-up
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-02-22 15:14:10 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-02-24 21:51:54 +0100
commitf46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch)
tree31544a450651d0705ecdea0c3d35e650ef784d67 /ppp-on-up
parentb0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff)
global: give script or function name in log messages
Diffstat (limited to 'ppp-on-up')
-rw-r--r--ppp-on-up5
1 files changed, 3 insertions, 2 deletions
diff --git a/ppp-on-up b/ppp-on-up
index cf95e48..fe1492d 100644
--- a/ppp-on-up
+++ b/ppp-on-up
@@ -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 ];