anchor.diff:  write(#dl_transport{log = Log}, Data) ->
       disk_log:balog(Log, erlang:iolist_to_binary(Data)).
   
  -flush(#dl_transport{log = Log}) ->
  +force_flush(#dl_transport{log = Log}) ->
  +    error_logger:info_msg("~p syncing~n", [?MODULE]),
       disk_log:sync(Log).
  +
  +flush(#dl_transport{log = Log, sync_every = SE}) ->
  +    case SE of
  +        undefined -> % no time-based sync
  +            disk_log:sync(Log);
  +        _Else ->     % sync will happen automagically
  +            ok
  +    end.
  +
   
   %% On close, close the underlying log if we're configured to do so.
   close(#dl_transport{close_on_close = false}) ->
  
positive.code: %% when the transport is closed, pass a {close_on_close, true} tuple in the
  %% Opts list.
  new(LogName, Opts) when is_atom(LogName), is_list(Opts) ->
      State = #dl_transport{log = LogName},
  
      State2 =
          case State#dl_transport.sync_every of
              N when is_integer(N), N > 0 ->
                  {ok, TRef} = timer:apply_interval(N, ?MODULE, flush, State),
                  State#dl_transport{sync_tref = TRef};
              _ -> State
          end,
  
      thrift_transport:new(?MODULE, parse_opts(Opts, State2)).
  
  
  parse_opts([], State) ->
  
negative.code: %%%% FACTORY GENERATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  new_transport_factory(Name, ExtraLogOpts) ->
      new_transport_factory(Name, ExtraLogOpts, [{close_on_close, true},
                                                 {sync_every, 500}]).
  
  new_transport_factory(Name, ExtraLogOpts, TransportOpts) ->
      F = fun() -> factory_impl(Name, ExtraLogOpts, TransportOpts) end,
      {ok, F}.
  
  factory_impl(Name, ExtraLogOpts, TransportOpts) ->
      LogOpts = [{name, Name},
                 {format, external},
                 {type, wrap} |
  