[erlang-questions] Simple Logging

Anton Lebedevich <>
Sun Feb 9 11:39:18 CET 2014


You might need to setup kernel error_logger in addition to sasl_error_logger.

On Mon, Feb 3, 2014 at 10:20 PM, Niklas Semmler <> wrote:
> Hi there,
>
> What does it take to get a simple logger running?
> - multiple logfiles
> - path = "./log/"
> - log errors, warnings(!) but no progress reports
>
> I tried the following configuration:
> [{sasl, [
>    {sasl_error_logger, false},
>    {errlog_type, error},
>    {error_logger_mf_dir,"./log"},
>    {error_logger_mf_maxbytes, 10485760},
>    {error_logger_mf_maxfiles, 2}
> ]}].
>
> I get errors and progress reports, but no warning or info messages. Stackoverflow says log_mf_h ignores errlog_type.
> http://stackoverflow.com/questions/5649332/sasl-stores-progress-report-despite-errlog-type-error
>
> But I don't find a way to fix this. I know there is the option to write my own gen_event handler, but I don't feel firm enough in Erlang to do that just yet. Existing handlers performed poorly.
>
> How can I implement this simple logger?
>
> -- Niklas
>
> PS: Lager is unfortunately not an option as I have to avoid any unnecessary dependencies.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions


More information about the erlang-questions mailing list