aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-24 19:53:15 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-24 19:53:15 +0100
commit556fc2d0d3a7a994efed1f2be61692442840d142 (patch)
treecd1dfe3050e3560e46956885d77b8645dc5bd233
parent69352c90d5efc641c7aedd277d8d3499127b96a9 (diff)
global-functions: introduce $LogAndError
-rw-r--r--global-functions9
1 files changed, 9 insertions, 0 deletions
diff --git a/global-functions b/global-functions
index d8d5b44..335df62 100644
--- a/global-functions
+++ b/global-functions
@@ -37,6 +37,7 @@
:global MailServerIsUp;
:global TimeIsSync;
:global WaitTimeSync;
+:global LogAndError;
# url encoding
:set UrlEncode do={
@@ -488,3 +489,11 @@
:delay 1s;
}
}
+
+# log and error with same text
+:set LogAndError do={
+ :local Message [ :tostr $1 ];
+
+ :log warn $Message;
+ :error $Message;
+}