anchor.diff:  -record(state, {port :: port() | {inactive, tuple()},
                   name :: term(),
                   messages,
  +                logger :: atom(),
                   log_tref :: timer:tref(),
                   log_buffer = [],
                   dropped=0 :: non_neg_integer(),
  
positive.code:     ?log_debug("Sending the following to port: ~p", [Msg]),
      port_command(State#state.port, Msg),
      {noreply, State};
  handle_info({_Port, {data, {_, Msg}}}, State) ->
      %% Store the last messages in case of a crash
      Messages = ringbuffer:add(Msg, State#state.messages),
      {Buf, Dropped} = case {State#state.log_buffer, State#state.dropped} of
                           {B, D} when length(B) < ?MAX_MESSAGES ->
                               {[Msg|B], D};
                           {B, D} ->
                               {B, D + 1}
                       end,
      TRef = case State#state.log_tref of
                 undefined ->
                     timer2:send_after(?INTERVAL, log);
                 T ->
                     T
             end,
      {noreply, State#state{messages=Messages, log_buffer=Buf, log_tref=TRef,
                            dropped=Dropped}};
  handle_info(log, State) ->
      State1 = log(State),
      {noreply, State1};
  
negative.code:     Prefix = io_lib:format("~p~p: ", [Name, self()]),
      [[Prefix, Line, $\n] || Line <- Lines].
  
  log(#state{logger = undefined} = State) ->
      case State#state.log_buffer of
          [] ->
              ok;
  