anchor.diff:                                   [Dropped, State#state.name])
               end
       end,
  -    State#state{log_tref=undefined, log_buffer=[], dropped=0}.
  +    State#state{log_tref=undefined, log_buffer=[], dropped=0};
  +log(_) ->
  +    ok.
   
   
   open_port({_Name, Cmd, Args, OptsIn}) ->
  
positive.code: -record(state, {port :: port() | {inactive, tuple()},
                  name :: term(),
                  messages,
                  log_tref :: timer:tref(),
                  log_buffer = [],
                  dropped=0 :: non_neg_integer(),
  
negative.code:     ?log_debug("Sending the following to port: ~p", [Msg]),
      port_command(State#state.port, Msg),
      {noreply, State};
  handle_info({_Port, {data, {_, Msg}}}, #state{logger = Logger} = State) ->
      %% Store the last messages in case of a crash
      Messages = ringbuffer:add(Msg, State#state.messages),
      State1 = State#state{messages=Messages},
  
      case Logger of
          undefined ->
              {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, State1#state{log_buffer=Buf, log_tref=TRef, dropped=Dropped}};
          _ ->
              ale:debug(Logger, [Msg, $\n]),
              {noreply, State1}
      end;
  handle_info(log, State) ->
      State1 = log(State),
      {noreply, State1};
  