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: %%% Author  : Todd Lipcon <todd@amiestreet.com>
  %%% Description : Write-only Thrift transport outputting to disk_log
  %%% Created : 22 Apr 2008 by Todd Lipcon <todd@lipcon.org>
  %%%-------------------------------------------------------------------
  -module(thrift_disk_log_transport).
  
  -behaviour(thrift_transport).
  
  %% API
  -export([new/2, new_transport_factory/2]).
  
  %% thrift_transport callbacks
  -export([read/2, write/2, flush/1, close/1]).
  
  %% state
  -record(dl_transport, {log,
  
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} |
  