[erlang-questions] Simple Logging

Niklas Semmler semmler@REDACTED
Mon Feb 3 19:20:26 CET 2014


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.


More information about the erlang-questions mailing list