anchor.diff:  
   
   %% CTH Callbacks
  --export([id/1, init/2, post_init_per_group/4, pre_end_per_group/3,
  -	 post_end_per_testcase/4]).
  +-export([id/1, init/2,
  +	 pre_init_per_suite/3, pre_end_per_suite/3, post_end_per_suite/4,
  +	 pre_init_per_group/3, post_init_per_group/4,
  +	 pre_end_per_group/3, post_end_per_group/4,
  +	 pre_init_per_testcase/3, post_end_per_testcase/4]).
   
   %% Event handler Callbacks
   -export([init/1,
  
positive.code:     EReport = error_logger_tty_h:write_event(
  		tag_event(Event),io_lib),
      if is_list(EReport) ->
  	    ct_logs:LogFunc(error_logger, ?STD_IMPORTANCE, "System", EReport, []);
         true -> %% Report is an atom if no logging is to be done
  	    ignore
      end,
      {ok, LogFunc}.
  
  
  handle_info(_,State) -> {ok, State}.
  
  handle_call(flush,State) ->
      {ok, ok, State};
  handle_call({set_logfunc,NewLogFunc},_) ->
      {ok, NewLogFunc, NewLogFunc};
  handle_call(_Query, _State) -> {error, bad_query}.
  
  terminate(_State) ->
      error_logger:delete_report_handler(?MODULE),
  
negative.code: tag_event(Event) ->
      {calendar:local_time(), Event}.
  
  set_curr_func(CurrFunc, Config) ->
      gen_event:call(error_logger, ?MODULE, {set_curr_func, CurrFunc, Config}).
  
  set_log_func(Func) ->
      gen_event:call(error_logger, ?MODULE, {set_logfunc, Func}).
  
  %%%-----------------------------------------------------------------
  
  format_header(#eh_state{curr_suite = Suite,
  			curr_group = undefined,
  			curr_func = undefined}) ->
      io_lib:format("System report during ~w", [Suite]);
  
  format_header(#eh_state{curr_suite = Suite,
  			curr_group = undefined,
  			curr_func = TcOrConf}) ->
      io_lib:format("System report during ~w:~w/1",
  		  [Suite,TcOrConf]);
  
  format_header(#eh_state{curr_suite = Suite,
  			curr_group = Group,
  			curr_func = Conf}) when Conf == init_per_group;
  						Conf == end_per_group ->
      io_lib:format("System report during ~w:~w/2 for ~w",
  		  [Suite,Conf,Group]);
  
  format_header(#eh_state{curr_suite = Suite,
  			curr_group = Group,
  			parallel_tcs = true}) ->
      io_lib:format("System report during ~w in ~w",
  		  [Group,Suite]);
  
  format_header(#eh_state{curr_suite = Suite,
  			curr_group = Group,
  			curr_func = TC}) ->
      io_lib:format("System report during ~w:~w/1 in ~w",
  		  [Suite,TC,Group]).
  