[erlang-questions] no more logs using logger with common tests

Siri Hansen erlangsiri@REDACTED
Wed May 29 09:57:00 CEST 2019


This PR should solve the problem with relative paths:
https://github.com/erlang/otp/pull/2264

tir. 28. mai 2019 kl. 12:35 skrev Siri Hansen <erlangsiri@REDACTED>:

> Do you see any printout in the shell like
>
> Logger - error: {removed_failing_handler,default}
>
> ??
>
> The log files should be created relative to your current work directory -
> but when trying similar configuration as you describe it seems logger fails
> pretty soon due to ct's change of current directory :( Can you try it once
> with an absolute path to verify if you're facing the same problem or if
> it's something else?
>
> Regards
> /siri
>
> tir. 28. mai 2019 kl. 11:14 skrev Benoit Chesneau <bchesneau@REDACTED>:
>
>> Hi all,
>>
>> I've switched my code to logger macros instead of using lager. But now
>> I've no log stored on the filesystem ie in
>> `_build/test/logs/ct_run.nonode\@nohost.2019-05-28_10.49.10/` or similar
>> folder.. Any idea what could be the issue?
>>
>>
>>
>> I use  following sys config:
>>
>> ```
>> [
>>  {kernel,
>>   [
>>    {logger_level, debug},
>>
>>
>>    {logger,
>>     [{handler, default, logger_std_h,
>>       #{level => error,
>>         config => #{file => "log/erlang.log"}}},
>>
>>      {handler, info, logger_std_h,
>>       #{level => debug,
>>         config => #{file => "log/debug.log"}}}
>>     ]}]}
>> ].
>> ```
>>
>> ad my rebar.config:
>>
>> ```
>> ...
>> {ct_opts, [
>>   {sys_config, ["config/test.config"]},
>>
>>   {ct_hooks, [cth_surefire]}
>>
>> ]}.
>> ```
>>
>> Hope it helps, any idea is welcome :)
>>
>> Benoit
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190529/c9e08c65/attachment.htm>


More information about the erlang-questions mailing list