erlang-lager / lager

A logging framework for Erlang/OTP
Apache License 2.0
1.13k stars 455 forks source link

Translate all logger events to Lager events #521

Open hauleth opened 5 years ago

hauleth commented 5 years ago

This is similar approach that Elixir's logger take some time ago, where Lager messages still will be handled by the Lager only, but it will also get messages from the logger module. This should easy the migration like mentioned in #519 where all messages are passed through logger from day 1. This would also resolve #492 as Lager would replace default handler for all messages, not just error_logger.

Later this could be improved in similar way to elixir-lang/elixir#9333

jadeallenx commented 5 years ago

I think @Vagabond is planning along these lines for the future 4.x version of lager. Thanks for the issue though.

hauleth commented 5 years ago

Yes, I have seen their work. My point is to reduce scope for a moment, and do not rewrite all log commands as well, but for now just provide logging facilities for logger (and soon Elixir's Logger) users.

g-andrade commented 5 years ago

My point is to reduce scope for a moment, and do not rewrite all log commands as well, [...]

In case more elegant alternatives don't come up within a short time frame, fake-lager might be useful to you, but it's still rather experimental.