anchor.diff:  debug_options([trace | T], Debug) ->
       debug_options(T, install_debug(trace, true, Debug));
   debug_options([log | T], Debug) ->
  -    debug_options(T, install_debug(log, {10, []}, Debug));
  +    debug_options(T, install_debug(log, nlog_new(), Debug));
   debug_options([{log, N} | T], Debug) when is_integer(N), N > 0 ->
  -    debug_options(T, install_debug(log, {N, []}, Debug));
  +    debug_options(T, install_debug(log, nlog_new(N), Debug));
   debug_options([statistics | T], Debug) ->
       debug_options(T, install_debug(statistics, init_stat(), Debug));
   debug_options([{log_to_file, FileName} | T], Debug) ->
  
positive.code: -spec print_log(Debug) -> 'ok' when
        Debug :: [dbg_opt()].
  print_log(Debug) ->
      {_N, Logs} = get_debug(log, Debug, {0, []}),
      lists:foreach(fun print_event/1,
  		  lists:reverse(Logs)).
      
  close_log_file(Debug) ->
      case get_debug2(log_to_file, Debug, []) of
  
negative.code: debug_cmd({trace, false}, Debug) ->
      {ok, remove_debug(trace, Debug)};
  debug_cmd({log, true}, Debug) ->
      NLog = get_debug(log, Debug, nlog_new()),
      {ok, install_debug(log, nlog_new(NLog), Debug)};
  debug_cmd({log, {true, N}}, Debug) when is_integer(N), 1 =< N ->
      NLog = get_debug(log, Debug, nlog_new(N)),
      {ok, install_debug(log, nlog_new(N, NLog), Debug)};
  debug_cmd({log, false}, Debug) ->
      {ok, remove_debug(log, Debug)};
  debug_cmd({log, print}, Debug) ->
      print_log(Debug),
      {ok, Debug};
  debug_cmd({log, get}, Debug) ->
      NLog = get_debug(log, Debug, nlog_new()),
      {{ok, nlog_get(NLog)}, Debug};
  debug_cmd({log_to_file, false}, Debug) ->
      NDebug = close_log_file(Debug),
      {ok, NDebug};
  