Hi, everyone,
I have some questions about the change of the logger in Elixir 1.15.
- Are the two concepts “backends” and “handlers” the same thing?
- Is the
message
in the event {level, group_leader, {Logger, message, timestamp, metadata}}
always a string? How can I get the structural content in a backend?
- If I want to log all messages to a network, should I implement a handler or a backend or something else?
Afaik backends are the elixir Logger
equivalent to what handlers are to erlangs :logger
. With 1.15 elixir moved to deprecate the former in favor of the latter, taking steps in consolidating logging capabilities with erlang and deprecating its own implementations. If you’re building something new it should be a :logger
handler, not a Logger
backend.
2 Likes
Thank you. That makes sense. Maybe the documentation should mention that.
1 Like