anchor.diff:                          ok
                   end
               },
  -
               {"test logging works from inside a begin/end block",
                   fun() ->
                           ?assertEqual(0, count()),
  
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: handle_event({log, Level, Time, Message}, #state{level=LogLevel,
          buffer=Buffer} = State) when Level >= LogLevel ->
      {ok, State#state{buffer=Buffer ++ [{Level, Time, Message}]}};
  handle_event({log, Level, Time, Message}, #state{ignored=Ignored} = State) ->
      {ok, State#state{ignored=Ignored ++ [ignored]}};
  handle_event(_Event, State) ->
      {ok, State}.
  
  