anchor.diff:                          ?assertEqual(100, count()),
                           ok
                   end
  +            },
  +            {"log messages below the threshold are ignored",
  +                fun() ->
  +                        ?assertEqual(0, count()),
  +                        lager:debug("this message will be ignored"),
  +                        ?assertEqual(0, count()),
  +                        ?assertEqual(0, count_ignored()),
  +                        lager_mochiglobal:put(loglevel, 0),
  +                        lager:debug("this message should be ignored"),
  +                        ?assertEqual(0, count()),
  +                        ?assertEqual(1, count_ignored()),
  +                        lager:set_loglevel(lager_test_backend, debug),
  +                        lager:debug("this message should be logged"),
  +                        ?assertEqual(1, count()),
  +                        ?assertEqual(1, count_ignored()),
  +                        ?assertEqual(debug, lager:get_loglevel(lager_test_backend)),
  +                        ok
  +                end
               }
           ]
       }.
  
positive.code: -endif.
  
  init([Level]) ->
      {ok, #state{level=lager_util:level_to_num(Level), buffer=[]}}.
  
  handle_call(count, #state{buffer=Buffer} = State) ->
      {ok, length(Buffer), State};
  handle_call(pop, #state{buffer=Buffer} = State) ->
      case Buffer of
          [] ->
  
negative.code: 
  count() ->
      gen_event:call(lager_event, lager_test_backend, count).
  
  count_ignored() ->
      gen_event:call(lager_event, lager_test_backend, count_ignored).
  
  lager_test_() ->
      {foreach,
  