Closed dvic closed 3 months ago
The documentation mentions that you can configure the logger like this:
:logger.update_handler_config(:default, :formatter, {Basic, []})
However, this will give a dialyzer error, because :logger.update_handler_config requires the options to be a map: https://www.erlang.org/doc/apps/kernel/logger.html#update_handler_config/3 and https://www.erlang.org/doc/apps/kernel/logger.html#t:formatter_config/0.
:logger.update_handler_config
This PR changes the format/2 callback to supports opts that are maps and updates the docs so that users don't get dialyzer errors.
format/2
opts
coverage: 100.0%. remained the same when pulling 374e0b9abb406a2e540ffd4c17973ed6c8dd5454 on qdentity:fix-logger-opts-maps into a43bcd39021c4df16c657f446b71e1e9d62fbb17 on Nebo15:master.
The documentation mentions that you can configure the logger like this:
:logger.update_handler_config(:default, :formatter, {Basic, []})
However, this will give a dialyzer error, because
:logger.update_handler_config
requires the options to be a map: https://www.erlang.org/doc/apps/kernel/logger.html#update_handler_config/3 and https://www.erlang.org/doc/apps/kernel/logger.html#t:formatter_config/0.This PR changes the
format/2
callback to supportsopts
that are maps and updates the docs so that users don't get dialyzer errors.