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 --- check-lte-firmware-upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'check-lte-firmware-upgrade') diff --git a/check-lte-firmware-upgrade b/check-lte-firmware-upgrade index ed3cb98..f55ec5f 100644 --- a/check-lte-firmware-upgrade +++ b/check-lte-firmware-upgrade @@ -6,6 +6,7 @@ # check for LTE firmware upgrade, send notification # https://git.eworm.de/cgit/routeros-scripts/about/doc/check-lte-firmware-upgrade.md +:local 0 "check-lte-firmware-upgrade"; :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } @@ -13,7 +14,7 @@ :global SentLteFirmwareUpgradeNotification; :global CharacterReplace; -:global LogPrintExit; +:global LogPrintExit2; :global SendNotification; :global SymbolForNotification; @@ -23,7 +24,7 @@ :local Firmware [ / interface lte firmware-upgrade $Interface once as-value ]; :if ($SentLteFirmwareUpgradeNotification = ($Firmware->"latest")) do={ - $LogPrintExit debug ("Already sent the LTE firmware upgrade notification for version " . \ + $LogPrintExit2 debug $0 ("Already sent the LTE firmware upgrade notification for version " . \ ($Firmware->"latest") . ".") false; } else={ :if (($Firmware->"installed") != ($Firmware->"latest")) do={ @@ -38,7 +39,7 @@ } } } on-error={ - $LogPrintExit debug ("Could not get latest LTE firmware version for interface " . \ + $LogPrintExit2 debug $0 ("Could not get latest LTE firmware version for interface " . \ $IntName . ".") false; } } -- cgit v1.2.3-54-g00ecf