Browse files

Fix log minlevel

  • Loading branch information...
1 parent 7f3e5f9 commit b43bb74bd920a418ba09fd3e7e0e0ae1045d0926 @fenek committed Aug 22, 2012
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

0 comments on commit b43bb74

Please sign in to comment.