Migrating to Logger

Vance Shipley vances@REDACTED
Fri May 29 12:56:23 CEST 2020


That's cheating. Once error_logger is deprecated I wouldn't expect it's
special handling to remain in logger.

On Fri, May 29, 2020 at 6:04 PM Łukasz Niemier <lukasz@REDACTED> wrote:

> But it is compatible. This is how `error_logger:report_info/2` is
> implemented:
>
> -spec info_report(Type, Report) -> 'ok' when
>       Type :: any(),
>       Report :: report().
>
> info_report(Type, Report) ->
>     logger:log(notice,
>                #{label=>{?MODULE,info_report},
>                  report=>Report},
>                meta(info_report,Type)).
>
> So as you can see, the messages from `error_logger` are always passed
> through `logger` and for backwards compatibility there is output You have
> mentioned earlier. The important difference is how the message is passed to
> the `logger`.
>

-- 
     -Vance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200529/413c71bf/attachment.htm>


More information about the erlang-questions mailing list