From 312caf3f9081c2a18d387b215f989dcd09f1f364 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Feb 2020 12:11:50 +0100 Subject: global-functions: introduce $LogAndPut --- global-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/global-functions b/global-functions index 0e3b5f1..7e70d01 100644 --- a/global-functions +++ b/global-functions @@ -38,6 +38,7 @@ :global TimeIsSync; :global WaitTimeSync; :global LogAndError; +:global LogAndPut; # url encoding :set UrlEncode do={ @@ -498,3 +499,12 @@ [ :parse (":log " . $Severity . " \$Message") ]; :error ($Severity . ": " . $Message); } + +# log and put (print on terminal) same text +:set LogAndPut do={ + :local Severity [ :tostr $1 ]; + :local Message [ :tostr $2 ]; + + [ :parse (":log " . $Severity . " \$Message") ]; + :put ($Severity . ": " . $Message); +} -- cgit v1.2.3-54-g00ecf