diff options
author | Christian Hesse <mail@eworm.de> | 2021-02-22 15:14:10 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-02-24 21:51:54 +0100 |
commit | f46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch) | |
tree | 31544a450651d0705ecdea0c3d35e650ef784d67 /check-lte-firmware-upgrade | |
parent | b0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff) |
global: give script or function name in log messages
Diffstat (limited to 'check-lte-firmware-upgrade')
-rw-r--r-- | check-lte-firmware-upgrade | 7 |
1 files changed, 4 insertions, 3 deletions
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; } } |