1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

global-functions: $LogAndError: add severity

This commit is contained in:
Christian Hesse
2020-02-26 12:09:19 +01:00
parent 6ef764c7d7
commit 3ebf68a08c
12 changed files with 16 additions and 15 deletions

View File

@ -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);
}