[erlang-questions] r21 logger difficulties
Mark Geib
mark.geib.44@REDACTED
Mon Jul 9 16:51:54 CEST 2018
Thanks Siri,
But in my sys.config I included the log level, and I was trying to set it to “debug”.
I just now changed the level to “all” but still nothing in the log file.
BTW, if I force a crash due to runtime error I do see the crash reports in the log file, but that is all.
Also, lager is being pulled in by a dependency, could there be a conflict with lager.??
Thanks,
Mark.
> On Jul 9, 2018, at 1:33 AM, Siri Hansen <erlangsiri@REDACTED> wrote:
>
> Hi Mark, you just missed that the primary log level by default is 'notice', which means that 'info' is rejected by the primary log level check. If you do logger:notice("test message") instead, it should be printed. To even print 'info', set the kernel configuration parameter logger_level to 'info', 'debug' or 'all' in your sys config, or set it in runtime with logger:set_primary_config(level,Level).
>
> Regards
> /siri
>
> Den fre. 6. jul. 2018 kl. 20:44 skrev Mark Geib <mark.geib.44@REDACTED <mailto:mark.geib.44@REDACTED>>:
> I decided to take a look at the new logger in R21, but I am not able to produce any output.
>
> In my sys.config I have the following:
> {kernel,
> [{logger,
> [{handler, default, logger_std_h,
> #{level => debug,
> config => #{type => {file,"log/erlang.log"}},
> formatter => {logger_formatter, #{template => [time," ",pid," ",msg,"\n"]}}}
> }]
> }]
> }
>
> And in my code I do something like logger:info(“test message”), but I never see any output to the file. I see the file log/erlang.log created, but always empty.
>
> I must be missing something, but I have read through the docs, quickly.
>
> Any pointers would be appreciated.
>
> Mark.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
> http://erlang.org/mailman/listinfo/erlang-questions <http://erlang.org/mailman/listinfo/erlang-questions>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180709/0c494984/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 528 bytes
Desc: Message signed with OpenPGP
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180709/0c494984/attachment.bin>
More information about the erlang-questions
mailing list