Closed
Description
Elixir and Erlang/OTP versions
Erlang/OTP 26 [erts-14.0.1] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [jit:ns]
Elixir 1.15.0 (compiled with Erlang/OTP 26)
Operating system
Ubuntu 22.04
Current behavior
It seems the special metadata :function
is not outputted anymore in Elixir 1.15:
template = Logger.Formatter.compile("\n$time $metadata[$level] $message\n")
Logger.Formatter.format(
%{
level: :warn,
msg: {:string, "foo"},
meta: %{
mfa: {Logger.Formatter, :compile, 1}
}
},
%Logger.Formatter{
template: template,
metadata: [:module, :function, :mfa],
utc_log?: true,
truncate: 1000,
colors: %{enabled: false}
}
)
|> IO.chardata_to_string()
results in :
"\n10:13:15.268 module=Logger.Formatter mfa=Logger.Formatter.compile/1 [warn] foo\n"
The :module
and :mfa
are outputted as expected, but the :function
missing.
Expected behavior
I expect this output:
"\n10:13:15.268 module=Logger.Formatter function=compile/1 mfa=Logger.Formatter.compile/1 [warn] foo\n"
Metadata
Metadata
Assignees
Labels
No labels