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

Andrew Thompson andrew@REDACTED
Thu Jul 21 23:21:42 CEST 2011

Trying to reply to several emails here, bear with me.

Lager actually filters in 2 places, at the logging callsite (via a
lookup in mochiglobal, which is *very* fast) and then each backend also
filters, because you may have different backends consuming different
levels. Lager calculates the minimum level in use and stores that in the
mochiglobal value.

The use of mochiglobal was something I kind of agonized over, but its
solid code (riak uses it heavily) and its the fastest option for this
kind of 'read often, write seldom' value.

For log rotation, I find the builtin rotation to be inadequate. Lager
will shortly have its own size and date based rotation (size is done,
but in a branch and I'm working on date right now) that should be more
consistant with what normal rotation tools do.

With regard to more configurable formatting, that's something I'd like
to work on, but I don't want it to be too expensive. Maybe I can do some
compile-time voodoo with like -DFORMAT_STRING="..." and use that to
optimize how values are captured and formatted at compile time.

Thanks for all the suggestions guys, I've certainly gotten some new
ideas from this thread.


More information about the erlang-questions mailing list