mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Use proper format depending on the formatter (#4256)
This fixes recent commmit 090a8e3
This commit is contained in:
parent
c013a59d16
commit
9bd6b11007
@ -370,7 +370,16 @@ console_template() ->
|
||||
andalso
|
||||
'Elixir.System':version() >= <<"1.15">> of
|
||||
true ->
|
||||
[date, " ", time, " [", level, "] ", msg, "\n"];
|
||||
{ok, DC} = logger:get_handler_config(default),
|
||||
MessageFormat = case maps:get(formatter, DC) of
|
||||
%% https://hexdocs.pm/logger/1.17.2/Logger.Formatter.html#module-formatting
|
||||
{'Elixir.Logger.Formatter', _} ->
|
||||
message;
|
||||
%% https://www.erlang.org/doc/apps/kernel/logger_formatter#t:template/0
|
||||
{logger_formatter, _} ->
|
||||
msg
|
||||
end,
|
||||
[date, " ", time, " [", level, "] ", MessageFormat, "\n"];
|
||||
false ->
|
||||
[time, " [", level, "] " | msg()]
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user