Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix log minlevel

  • Loading branch information...
commit b43bb74bd920a418ba09fd3e7e0e0ae1045d0926 1 parent 7f3e5f9
@fenek authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  src/lager_console_backend.erl
  2. +1 −1  src/lager_file_backend.erl
View
2  src/lager_console_backend.erl
@@ -52,7 +52,7 @@ init([Level, Verbose]) ->
%% @private
handle_call(get_loglevel, #state{level=GenLevel, mod_levels = ModLvls} = State) ->
- Level = erlang:hd(lists:sort([GenLevel | [ ModLvl || {_, ModLvl} <- ModLvls ]])),
+ Level = erlang:tl(lists:sort([GenLevel | [ ModLvl || {_, ModLvl} <- ModLvls ]])),
{ok, Level, State};
handle_call({get_mod_loglevel, Module}, #state{mod_levels = ModLvls} = State) ->
case lists:keysearch(Module, 1, ModLvls) of
View
2  src/lager_file_backend.erl
@@ -100,7 +100,7 @@ handle_call({clear_loglevel, []}, State) ->
handle_call({clear_loglevel, Module}, #state{mod_levels = ModLvls} = State) ->
{ok, ok, State#state{ mod_levels = lists:keydelete(Module, 1, ModLvls) }};
handle_call(get_loglevel, #state{level=GenLevel, mod_levels = ModLvls} = State) ->
- Level = erlang:hd(lists:sort([GenLevel | [ ModLvl || {_, ModLvl} <- ModLvls ]])),
+ Level = erlang:tl(lists:sort([GenLevel | [ ModLvl || {_, ModLvl} <- ModLvls ]])),
{ok, Level, State};
handle_call({get_mod_loglevel, Module}, #state{mod_levels = ModLvls} = State) ->
case lists:keysearch(Module, 1, ModLvls) of
Please sign in to comment.
Something went wrong with that request. Please try again.