aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
+}