anchor.diff:              msg_stat(drain_buffered, 1, State),
               NewBuf = logplex_drain_buffer:push(Msg, State#state.buf),
               NewState = tcp_bad(State#state{buf=NewBuf}),
  -            ?ERR("drain_id=~p channel_id=~p dest=~s at=post err=gen_tcp data=~p",
  -                 log_info(NewState, [Reason])),
  +            ?ERR("drain_id=~p channel_id=~p dest=~s at=post err=gen_tcp data=~p duration=~p",
  +                 log_info(NewState, [Reason, duration(State)])),
               {noreply, reconnect(tcp_error, NewState)}
       end;
   
  
positive.code:                             post_buffer(tcp_good(State#state{buf=NewBuf}));
                          {error, Reason} ->
                              ?ERR("drain_id=~p channel_id=~p dest=~s at=post "
                                   "err=gen_tcp data=~p",
                                   log_info(State, [Reason])),
                              reconnect(tcp_error,
                                        tcp_bad(State))
                      end
  
negative.code:     logplex_stats:incr(#drain_stat{drain_id=DrainId,
                                     channel_id=ChannelId,
                                     key=Key}, N).
  
  duration(#state{connect_time=undefined}) ->
      undefined;
  duration(#state{connect_time=T0}) ->
      US = timer:now_diff(os:timestamp(), T0),
      US / 1000000.
  