How to change log level (logger) during test?
Sat Dec 12 17:36:27 CET 2020
For documentation I answer my own question.
To change the log level I had to do
logger:set_handler_config( ‘Elixir.logger’, level, warning )
My application includes tzdata. It is written in Elixir and does something to the log system that caused my confusion. Or the rebar3 plugin rebar_mix does it.
If somebody knows of a way to get the default handler instead of ‘Elixir.logger’ it would be great.
> On 29 Nov 2020, at 16:23, bengt <cean.ebengt@REDACTED> wrote:
> While running Common Test suites I get too many log messages (from info level). What should I do to change the log level?
> Erlang OTP 23, logger. No log config, that I set.
> I have tried:
> logger:set_primary_config( level, warning ) in init_per_suite/1. It returns ok, but info log continue.
> Also tried set_module_level/2. Same result.
> Best Wishes,
More information about the erlang-questions