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: -export([init/1, handle_call/2, handle_event/2, handle_info/2, terminate/2,
          code_change/3]).
  
  -record(state, {level, buffer}).
  -compile([{parse_transform, lager_transform}]).
  
  -ifdef(TEST).
  
negative.code:                         ok
                  end
              },
              {"test logging works from inside a begin/end block",
                  fun() ->
                          ?assertEqual(0, count()),
  