Skip to content

Instantly share code, notes, and snippets.

@artemeff
Created November 1, 2015 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artemeff/d938f9337d89dd77369b to your computer and use it in GitHub Desktop.
Save artemeff/d938f9337d89dd77369b to your computer and use it in GitHub Desktop.
lager:debug("throughput ~p num/s", [length(State)]).
% transforms to
case {whereis(lager_event), whereis(lager_event), lager_config:get({lager_event, loglevel}, {0, []})} of
{undefined, undefined, _} ->
fun () -> {error, lager_not_running} end();
{undefined, _, _} ->
fun () -> {error, {sink_not_configured, lager_event}} end();
{__Pidfb_throughput43, _, {__Levelfb_throughput43, __Tracesfb_throughput43}} when __Levelfb_throughput43 band 128 /= 0 orelse __Tracesfb_throughput43 /= [] ->
lager:do_log(debug, [{application, fb}, {module, fb_throughput}, {function, handle_info}, {line, 43}, {pid, pid_to_list(self())}, {node, node()} | lager:md()], "throughput ~p num/s", [length(State)], 4096, 128, __Levelfb_throughput43, __Tracesfb_throughput43, lager_event, __Pidfb_throughput43);
_ ->
ok
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment