anchor.diff:               #state{logger=Logger} = State) when Type =:= info_report;
                                                    Type =:= warning_report;
                                                    Type =:= error_report ->
  -    log_report(Type, Logger, Report),
  -    {ok, State};
  +    case action(State) of
  +        {log, NewState} ->
  +            log_report(Type, Logger, Report),
  +            {ok, NewState};
  +        {drop, NewState} ->
  +            {ok, NewState}
  +    end;
   
   handle_event({Type, _GLeader, Msg},
                #state{logger=Logger} = State) when Type =:= info_msg;
                                                    Type =:= warning_msg;
                                                    Type =:= error ->
  -    log_msg(Type, Logger, Msg),
  -    {ok, State};
  +    case action(State) of
  +        {log, NewState} ->
  +            log_msg(Type, Logger, Msg),
  +            {ok, NewState};
  +        {drop, NewState} ->
  +            {ok, NewState}
  +    end;
   
   handle_event(_Event, State) ->
       {ok, State}.
  
positive.code: 
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  log_report(Type, Logger, {_Pid, ReportType, Report}) ->
      LogLevel = type_to_loglevel(Type),
  
negative.code: 
  -compile({parse_transform, ale_transform}).
  
  -define(MAILBOX_LIMIT, 5000).
  -define(MAILBOX_RECOVER_LIMIT, 500).
  
  -record(state, {logger :: atom(),
                  logging_state :: log | drop}).
  
  init([Logger]) ->
      State = #state{logger=Logger,
                     logging_state=log},
      {ok, State}.
  
  handle_event({_Type, GLeader, _Msg}, State) when node(GLeader) =/= node() ->
  