aboutsummaryrefslogtreecommitdiffstats
path: root/cloud-backup
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 /cloud-backup
parentb0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff)
global: give script or function name in log messages
Diffstat (limited to 'cloud-backup')
-rw-r--r--cloud-backup5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloud-backup b/cloud-backup
index e4e527b..598a500 100644
--- a/cloud-backup
+++ b/cloud-backup
@@ -6,6 +6,7 @@
# upload backup to MikroTik cloud
# https://git.eworm.de/cgit/routeros-scripts/about/doc/cloud-backup.md
+:local 0 "cloud-backup";
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@@ -13,7 +14,7 @@
:global Identity;
:global DeviceInfo;
-:global LogPrintExit;
+:global LogPrintExit2;
:global SendNotification;
:global SymbolForNotification;
:global WaitFullyConnected;
@@ -42,5 +43,5 @@ $WaitFullyConnected;
} on-error={
$SendNotification ([ $SymbolForNotification "warning-sign" ] . "Cloud backup failed") \
("Failed uploading backup for " . $Identity . " to cloud!\n\n" . [ $DeviceInfo ]);
- $LogPrintExit error ("Failed uploading backup for " . $Identity . " to cloud!") true;
+ $LogPrintExit2 error $0 ("Failed uploading backup for " . $Identity . " to cloud!") true;
}