Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix logger reset for the shell plugin
The shell plugin has to reset the logger by fetching its configuration and re-applying it later. In the current state, `maybe_reset_logger/1` will only re-apply part of the configuration (the `config` key), which does not include other settings such as filters and formatters. The effect can be demonstrated by adding filters or formatters to `~/.erlang` and running rebar3 shell on any project (without any --config argument, this one reload the logger env; updating the kernel/logger environment in `~/.erlang` fixes it). For example: ```erlang logger:set_handler_config(default, #{formatter => {logger_formatter, #{template => ["> ", msg, "\n"]}}}). ``` This patch makes sure the default handler is re-created with its entire original configuration.
- Loading branch information