From f46db918453dcb8878b9a0de6e122fb0ea2224d9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 22 Feb 2021 15:14:10 +0100 Subject: global: give script or function name in log messages --- sms-action | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sms-action') diff --git a/sms-action b/sms-action index 4c39740..2d2600d 100644 --- a/sms-action +++ b/sms-action @@ -6,17 +6,18 @@ # run action on received SMS # https://git.eworm.de/cgit/routeros-scripts/about/doc/sms-action.md +:local 0 "sms-action"; :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :global SmsAction; -:global LogPrintExit; +:global LogPrintExit2; :local Action $action; :if ([ :typeof $Action ] = "nothing") do={ - $LogPrintExit error "This script is supposed to run from SMS hook with action=..." true; + $LogPrintExit2 error $0 ("This script is supposed to run from SMS hook with action=...") true; } :local Code ($SmsAction->$Action); -- cgit v1.2.3-54-g00ecf