anchor.diff:  string_p1([]) -> true;
   string_p1(_) ->  false.
   
  -write_time(Time) -> write_time(Time, "ERROR REPORT").
   write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) ->
       io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n",
   		  [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]);
  
positive.code: 
  -export([write_event/2]).
  
  %% This one is used when we takeover from the simple error_logger.
  init({[], {error_logger, Buf}}) ->
      User = set_group_leader(),
      write_events(Buf,io),
      {ok, {User, error_logger}};
  %% This one is used if someone took over from us, and now wants to
  %% go back.
  init({[], {error_logger_tty_h, PrevHandler}}) ->
      User = set_group_leader(),
      {ok, {User, PrevHandler}};
  %% This one is used when we are started directly.
  init([]) ->
      User = set_group_leader(),
      {ok, {User, []}}.
      
  handle_event({_Type, GL, _Msg}, State) when node(GL) =/= node() ->
      {ok, State};
  handle_event(Event, State) ->
      ok = write_event(tag_event(Event),io),
      {ok, State}.
  
  handle_info({'EXIT', User, _Reason}, {User, PrevHandler}) ->
      case PrevHandler of
  	[] ->
  	    remove_handler;
  	_ -> 
  	    {swap_handler, install_prev, {User, PrevHandler}, 
  	     PrevHandler, go_back}
      end;
  handle_info(_, State) ->
  
negative.code: 
  handle_call(_Query, State) -> {ok, {error, bad_query}, State}.
  
  terminate(install_prev, _State) ->
      [];
  terminate(_Reason, #st{prev_handler=PrevHandler}) ->
      {error_logger_tty_h, PrevHandler}.
  
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  %% Exported (but unoffical) API.
  write_event(Event, IoMod) ->
      do_write_event(#st{io_mod=IoMod}, Event).
  
  
  %%% ------------------------------------------------------
  %%% Misc. functions.
  