Incompatible changes for master (1.x)

3 views
Skip to first unread message

Marc Worrell

unread,
Feb 2, 2022, 9:47:57 AM2/2/22
to 'Marc Worrell' via Zotonic users
Hi,,

We are have merged incompatible changes to the master branch.
You will probably need to update your code and erlang.config file.

What is changed?

The logging program lager is removed.
It is replaced with the standard Erlang OTP Logger application.


What code changes are needed?

You will need to change the occurrences of lager to the Logger macros.

lager:error(…)  becomes ?LOG_ERROR(…)
lager:warning(…)  becomes ?LOG_WARNING(…)
etc.

For this you need to add the following include:

-include_lib("kernel/include/logger.hrl”).

What erlang.config changes are needed?

In your erlang config file you can remove the lager section.
Then add the section marked here:


Other changes?

Remove from your rebar.config:

- lager_transform
- lager deps

Why?

Logger is replacing lager in the Erlang eco system.
It also enables us to:

- Add structured logging
- Have a nice reporter with stack traces



Cheers,

Marc

Reply all
Reply to author
Forward
0 new messages