aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-26 12:09:19 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-26 12:09:19 +0100
commit3ebf68a08c94e23d742a37815caa3c55b6985806 (patch)
tree86ff5ab9d07d34e5794857b1f22caae220cc5f2f /global-functions
parent6ef764c7d7dc855dc40313fbe79702d6949b7abb (diff)
global-functions: $LogAndError: add severity
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions7
1 files changed, 4 insertions, 3 deletions
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);
}