anchor.diff:      State1 = State#state{tref = undefined},
       case connect(State1) of
           {ok, Sock} ->
  -            ?INFO("[~s] connected to ~p:~p on try ~p.",
  -                  [State1#state.id, State1#state.host, State1#state.port,
  -                   State1#state.failures + 1]),
  +            ?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("[~s] Couldn't connect to ~p:~p; ~p"
  -                 " (try ~p, last success: ~s)",
  -                 [NewState#state.id, NewState#state.host, NewState#state.port,
  -                  Reason, NewState#state.failures, time_failed(NewState)]),
  +            ?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}) ->
  +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}) ->
  -    {stop, not_implemented, State};
  +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("Unexpected info ~p", [Info]),
  +    ?WARN("drain_id=~p channel_id=~p dest=~s err=unexpected_info data=~p",
  +          log_info(State, [Info])),
       {noreply, State}.
   
   %% @private
  
positive.code: 
  %% @private
  handle_call(Call, _From, State) ->
      ?WARN("Unexpected call ~p.", [Call]),
      {noreply, State}.
  
  %% @private
  handle_cast(Msg, State) ->
      ?WARN("Unexpected cast ~p", [Msg]),
      {noreply, State}.
  
  %% @private
  
negative.code:         ok ->
              {noreply, tcp_good(State)};
          {error, Reason} ->
              ?ERR("drain_id=~p channel_id=~p dest=~s at=post err=gen_tcp data=~p",
                   log_info(State, [Reason])),
              {noreply, reconnect(tcp_error, State)}
      end;
  
  