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

global-functions: $LogPrintExit2: handle empty name

This commit is contained in:
Christian Hesse
2022-04-28 11:01:57 +02:00
parent e74bec7e5b
commit f417bcbcd4

View File

@ -481,7 +481,7 @@
:return ("\1B[" . $Color->$1 . "m" . $1 . "\1B[0m");
}
:local Log ($Name . ": " . $Message);
:local Log ([ $EitherOr $Name "<unknown>" ] . ": " . $Message);
:if ($Severity ~ ("^(debug|error|info)\$")) do={
:if ($Severity = "debug") do={ :log debug $Log; }
:if ($Severity = "error") do={ :log error $Log; }