anchor.diff:    Format = gen_alog:get_opt(?FORMAT_ARG, DLArgs , ?FORMAT_DEF),
     Sync   = gen_alog:get_opt(?SYNC_ARG  , ADLArgs, ?SYNC_DEF),
     LogFun = get_log_fun(Format, Sync, ?LOG_FUNS),
  -  State = #state{log_fun = LogFun},
     case disk_log:open(DLArgs) of
       {ok, LogRef} ->
  -      State#state{ log_ref = LogRef};
  +      {LogRef, LogFun};
       {repaired, LogRef, _recovered, _badbytes} ->
  -      State#state{ log_ref = LogRef};
  +      {LogRef, LogFun};
       Error ->
         throw(Error)
     end.
  
positive.code: %% @private
  init([Opts]) ->
    Args  = get_args(Opts),
    State = open_logs(Args),
    {ok, State#state{opts = Opts}}.
  
  %% @private
  handle_call(reload, _From, #state{log_ref = LogRef, opts = Opts}) ->
    disk_log:sync(LogRef),
    disk_log:close(LogRef),
    Args  = get_args(Opts),
    State = open_logs(Args),
    {reply, ok, State#state{opts = Opts}};
  handle_call(stop, _From, #state{log_ref = LogRef} = State) ->
    disk_log:sync(LogRef),
    disk_log:close(LogRef),
    {stop, normal, ok, State};
  handle_call(_Msg, _From, State) ->
    {reply, ok, State}.
  
negative.code: -record(state, { log_ref
                 , log_fun
                 , opts
                 , name
                 , inode
                 , timer
                 }).
  
  -define(DEF_SUP_REF, alog_sup).
  
  -define(CHECK_INTERVAL, 600000).
  
  %% pre-defined key of 'format' option
  -define(FORMAT_ARG, format).
  