From 556fc2d0d3a7a994efed1f2be61692442840d142 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 24 Feb 2020 19:53:15 +0100 Subject: global-functions: introduce $LogAndError --- global-functions | 9 +++++++++ 1 file changed, 9 insertions(+) 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; +} -- cgit v1.2.3-54-g00ecf