[erlang-questions] When does lager logs into crash.log?

Martin Koroudjiev mrtndimitrov@REDACTED
Fri Jan 22 22:11:01 CET 2016


Hello,

from what I read about the error_logger "Error, warning and info events
are sent to the error logger from the Erlang runtime system and the
different Erlang/OTP applications." So, I guess, errors in
non-supervised code are also sent to the error_logger. But not to
lager's crash file. Actually this badmatch error is not reported
anywhere. How can I make lager report it?

Regards,
Martin

On 1/22/2016 7:55 PM, Nathaniel Waisbrot wrote:
>> dummy = application:get_env(myapp, test).
>>
>> This results in badmatch. But there is no entry in crash.log. I had
>> configured another log file warning.log that gets populated with a
>> one-liner but I would like to see the detailed report in crash.log.
>
>
> The crash.log comes from things that use the error_logger
> (http://erlang.org/doc/man/error_logger.html). Typically, this is OTP
> applications crashing.
>
> Try putting that badmatch inside of a gen_server's handle_cast/3
> method and you should see lager's handling (and if you disable crash
> logging in lager you can see what the default error_logger does with it).
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160122/50f7c1d6/attachment.htm>


More information about the erlang-questions mailing list