[erlang-questions] lager and dynamic log cutting via compiled module

Ulf Wiger ulf@REDACTED
Sat Aug 24 17:05:36 CEST 2013


The Feuerlabs fork of lager does basically this.

https://github.com/Feuerlabs/lager/compare/basho:master...master

I don't think it ever ended up as a pull request, though.

BR,
Ulf

On 24 Aug 2013, at 16:42, Max Lapshin <max.lapshin@REDACTED> wrote:

> log4erl logging library has an interesting feature: on loading config it generates module that cuts all log requests that are too verbose on caller side without any ets lookups or calls.
> 
> lager instead makes ets call to find out current loglevel. I can't say that it is a bad approach, but when my traffic is growing upper 8 Gbit/s from single node, I have to calculate each microsecond.
> 
> I suppose that thousands of requests per second to single row in ets table for finding out whether to log or not to log may be more blocking than executing precompiled erlang code.
> 
> So, question: why approach with compiled on-fly module is not used? Just because ets is more standard? Or "shut up and make pull request"?
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com



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


More information about the erlang-questions mailing list