[erlang-questions] [ANN] Lager - a new logging framework for Erlang/OTP

Max Lapshin max.lapshin@REDACTED
Thu Jul 21 07:50:56 CEST 2011

I will not get tired to tell, that current erlang implementations of
logging are great OOM killers for cases, when you need
to store 20+ megabytes of data in process.

OTP guys have added good format_state method, but one bad place has
left: it is dumping reason.

And reason of crash may include whole process state. I have fixed
gen_server for this:


and rewritten pretty_printer:


Without these changes small problem could bring down whole system,
making insolvent all claims for bullet-proof software.
The same situation is with message queue. If any streaming process in
erlyvideo blocks just for 5-20 seconds, its message queue
will grow to several megabytes of data. Dumping it via loggers will
finish erlang VM.

But good one-line loggers are ok, especially for startup. As here:


I had to rewrite application startup handling so that it should be
more readable.

So, thanks for your code and I'm running fast to read and test it.
I'll be glad if some of my code would be usefull for you.

More information about the erlang-questions mailing list