<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>The loglevel check is done using mochiglobal:</div><div><br></div><div>%% @doc Set the loglevel for a particular backend.<br>set_loglevel(Handler, Level) when is_atom(Level) -><br>    Reply = gen_event:call(lager_event, Handler, {set_loglevel, Level}, infinity),<br>    %% recalculate min log level<br>    MinLog = minimum_loglevel(get_loglevels()),<br>    {_, Traces} = lager_mochiglobal:get(loglevel),<br>    lager_mochiglobal:put(loglevel, {MinLog, Traces}),<br>    Reply.<br><br></div><div>Basho switched to an ets table in this pull request:</div><div><br></div><div><a href="https://github.com/basho/lager/pull/88">https://github.com/basho/lager/pull/88</a></div><div><br></div><div>"Replace mochiglobal with a public ETS table</div><div><br></div><div>This also removes the dependency on the syntax_tools and compiler</div>applications, which interfered with lager's startup/shutdown order.<br><br>I've benchmarked this with logbench, and performance doesn't seem to differ significantly from the mochiglobal version, and has much less baggage associated with it."<div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 24 Aug 2013, at 17:17, Max Lapshin <<a href="mailto:max.lapshin@gmail.com">max.lapshin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">It is not so clear for me: do you generate a proxy module on config loading or you make a parse_transform of code that uses lager:debug(..) ?</div>
</blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div><div>Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.</div><div><a href="http://feuerlabs.com">http://feuerlabs.com</a></div></div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>