aboutsummaryrefslogtreecommitdiffstats
path: root/email-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 /email-backup
parentb0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff)
global: give script or function name in log messages
Diffstat (limited to 'email-backup')
-rw-r--r--email-backup7
1 files changed, 4 insertions, 3 deletions
diff --git a/email-backup b/email-backup
index 7cd8222..129075a 100644
--- a/email-backup
+++ b/email-backup
@@ -6,6 +6,7 @@
# create and email backup and config file
# https://git.eworm.de/cgit/routeros-scripts/about/doc/email-backup.md
+:local 0 "email-backup";
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@@ -19,7 +20,7 @@
:global CharacterReplace;
:global DeviceInfo;
-:global LogPrintExit;
+:global LogPrintExit2;
:global WaitForFile;
:global WaitFullyConnected;
@@ -27,11 +28,11 @@ $WaitFullyConnected;
:if ($BackupSendBinary != true && \
$BackupSendExport != true) do={
- $LogPrintExit error ("Configured to send neither backup nor config export.") true;
+ $LogPrintExit2 error $0 ("Configured to send neither backup nor config export.") true;
}
:if ([ :len $EmailBackupTo ] = 0) do={
- $LogPrintExit error ("Configuration is missing recipient for e-mail backup.") true;
+ $LogPrintExit2 error $0 ("Configuration is missing recipient for e-mail backup.") true;
}
# filename based on identity