How can I use erlang’s logger library instead of the elixir default one? I wanted to try it since it has structure logging which is kinda nice.
I tried simply using :logger
directly, this does work, but the output is different from when I run the same command in erlang directly:
elixir:
iex(1) > :logger.error %{id: 123, from: :module, reason: “reason”}
22:12:04.078 [error] [from: :module, id: 123, reason: “reason”]
erlang:
2> logger:error(#{id => 123, from => module, reason => “reason”}).
=ERROR REPORT==== 24-Sep-2019::22:17:19.836413 ===
from: module
id: 123
reason: reason