anchor.diff:  log_loop(#state{cache_error = CE}=S, Pids, _Bins, _Sync, _Sz, _F) when CE =/= ok ->
       loop(cache_error(S, Pids));
   log_loop(#state{}=S, Pids, Bins, Sync, Sz, _F) when Sz > ?MAX_LOOK_AHEAD ->
  -    loop(log_end(S, Pids, Bins, Sync));
  +    loop(log_end(S, Pids, Bins, Sync, Sz));
   log_loop(#state{messages = []}=S, Pids, Bins, Sync, Sz, F) ->
       receive
   	Message ->
               log_loop(Message, Pids, Bins, Sync, Sz, F, S)
       after 0 ->
  -	    loop(log_end(S, Pids, Bins, Sync))
  +	    loop(log_end(S, Pids, Bins, Sync, Sz))
       end;
   log_loop(#state{messages = [M | Ms]}=S, Pids, Bins, Sync, Sz, F) ->
       S1 = S#state{messages = Ms},
  
positive.code: 	    put(log, L#log{extra = Handle}),
  	    {error, Error, Logged - Lost}
      end;
  do_log(L, B) when L#log.format_type =:= wrap_ext ->
      case disk_log_1:mf_ext_log(L#log.extra, B, L#log.head) of
  	{ok, Handle, Logged, Lost, Wraps} ->
  	    notify_owners_wrap(Wraps),
  
negative.code: 
  -spec do_log(#log{}, [binary()]) -> integer() | {'error', _, integer()}.
  
  do_log(L, B) ->
      do_log(L, B, iolist_size(B)).
  
  do_log(L, B, BSz) when L#log.type =:= halt ->
      #log{format = Format, extra = Halt} = L,
      #halt{curB = CurSize, size = Sz} = Halt,
      {Bs, BSize} = logl(B, Format, BSz),
      case get(is_full) of
  	true ->
              {error, {error, {full, L#log.name}}, 0};
  