anchor.diff:  
   %% @private
   handle_call(Call, _From, State) ->
  -    ?WARN("Unexpected call ~p.", [Call]),
  +    ?WARN("drain_id=~p channel_id=~p dest=~s err=unexpected_call data=~p",
  +          log_info(State, [Call])),
       {noreply, State}.
   
   %% @private
   handle_cast(Msg, State) ->
  -    ?WARN("Unexpected cast ~p", [Msg]),
  +    ?WARN("drain_id=~p channel_id=~p dest=~s err=unexpected_cast data=~p",
  +          log_info(State, [Msg])),
       {noreply, State}.
   
   %% @private
  
positive.code:                              [N,
                                logplex_syslog_utils:datetime(When)]
                              ).
  
negative.code:     State1 = State#state{tref = undefined},
      case connect(State1) of
          {ok, Sock} ->
              ?INFO("drain_id=~p channel_id=~p dest=~s at=connected try=~p",
                    log_info(State1, [State1#state.failures + 1])),
              NewState = tcp_good(State1#state{sock=Sock}),
              {noreply, post_buffer(NewState)};
          {error, Reason} ->
              NewState = tcp_bad(State1),
              ?ERR("drain_id=~p channel_id=~p dest=~s at=connect "
                   "err=gen_tcp data=~p try=~p last_success=~s",
                   log_info(State, [Reason, NewState#state.failures,
                                    time_failed(NewState)])),
              {noreply, reconnect(tcp_error, NewState)}
      end;
  
  handle_info({tcp_closed, S}, State = #state{sock = S}) ->
      ?INFO("drain_id=~p channel_id=~p dest=~s at=close",
            log_info(State, [])),
      {noreply, reconnect(tcp_closed, State#state{sock=undefined})};
  
  handle_info({tcp_error, S, Reason}, State = #state{sock = S}) ->
      ?ERR("drain_id=~p channel_id=~p dest=~s at=idle "
           "err=gen_tcp data=~p",
            log_info(State, [Reason])),
      {noreply, reconnect(tcp_error, State#state{sock=undefined})};
  
  handle_info({tcp, S, Data}, State = #state{sock = S}) ->
      ?WARN("drain_id=~p channel_id=~p dest=~s err=unexpected_peer_data data=~p",
            log_info(State, [Data])),
      {noreply, State};
  
  handle_info(Info, State) ->
      ?WARN("drain_id=~p channel_id=~p dest=~s err=unexpected_info data=~p",
            log_info(State, [Info])),
      {noreply, State}.
  
  %% @private
  