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