diff options
author | Christian Hesse <mail@eworm.de> | 2020-02-26 12:11:50 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-02-26 12:11:50 +0100 |
commit | 312caf3f9081c2a18d387b215f989dcd09f1f364 (patch) | |
tree | bf278044b998b5d78ae9be6a4a86f85cc6e9d127 | |
parent | 3ebf68a08c94e23d742a37815caa3c55b6985806 (diff) |
global-functions: introduce $LogAndPut
-rw-r--r-- | global-functions | 10 |
1 files changed, 10 insertions, 0 deletions
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); +} |