From 3ebf68a08c94e23d742a37815caa3c55b6985806 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 26 Feb 2020 12:09:19 +0100 Subject: global-functions: $LogAndError: add severity --- global-functions | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 335df62..0e3b5f1 100644 --- a/global-functions +++ b/global-functions @@ -492,8 +492,9 @@ # log and error with same text :set LogAndError do={ - :local Message [ :tostr $1 ]; + :local Severity [ :tostr $1 ]; + :local Message [ :tostr $2 ]; - :log warn $Message; - :error $Message; + [ :parse (":log " . $Severity . " \$Message") ]; + :error ($Severity . ": " . $Message); } -- cgit v1.2.3-54-g00ecf