anchor.diff:  
   -include("ct.hrl").
   
  +-record(eh_state, {log_func,
  +		   curr_suite,
  +		   curr_group,
  +		   curr_func,
  +		   parallel_tcs = false}).
  +
   id(_Opts) ->
       ?MODULE.
   
   init(?MODULE, _Opts) ->
       error_logger:add_report_handler(?MODULE),
       tc_log_async.
  +
  +
  +pre_init_per_suite(Suite, Config, State) ->
  +    set_curr_func({Suite,init_per_suite}, Config),
  +    {Config, State}.
  +
  +pre_end_per_suite(Suite, Config, State) ->
  +    set_curr_func({Suite,end_per_suite}, Config),
  +    {Config, State}.
  +
  +post_end_per_suite(_Suite, Config, Return, State) ->
  +    set_curr_func(undefined, Config),
  +    {Return, State}.
  +
  +pre_init_per_group(Group, Config, State) ->
  +    set_curr_func({group,Group,init_per_group}, Config),
  +    {Config, State}.
   
   post_init_per_group(Group, Config, Result, tc_log_async) ->
       case lists:member(parallel,proplists:get_value(
   				 tc_group_properties,Config,[])) of
   	true ->
  -	    {Result, {set_log_func(ct_log),Group}};
  +	    {Result, {set_log_func(tc_log),Group}};
   	false ->
   	    {Result, tc_log_async}
       end;
   post_init_per_group(_Group, _Config, Result, State) ->
       {Result, State}.
   
  +pre_init_per_testcase(TC, Config, State) ->
  +    set_curr_func(TC, Config),
  +    {Config, State}.
  +
   post_end_per_testcase(_TC, _Config, Result, State) ->
       %% Make sure that the event queue is flushed
       %% before ending this test case.
       gen_event:call(error_logger, ?MODULE, flush, 300000),
       {Result, State}.
   
  -pre_end_per_group(Group, Config, {ct_log, Group}) ->
  +pre_end_per_group(Group, Config, {tc_log, Group}) ->
  +    set_curr_func({group,Group,end_per_group}, Config),
       {Config, set_log_func(tc_log_async)};
  -pre_end_per_group(_Group, Config, State) ->
  -    {Config, State}.
  -
  +pre_end_per_group(Group, Config, State) ->
  +    set_curr_func({group,Group,end_per_group}, Config),
  +    {Config, State}.
  +
  +post_end_per_group(_Group, Config, Return, State) ->
  +    set_curr_func({group,undefined}, Config),
  +    {Return, State}.
   
   %% Copied and modified from sasl_report_tty_h.erl
   init(_Type) ->
  -    {ok, tc_log_async}.
  +    {ok, #eh_state{log_func = tc_log_async}}.
   
   handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() ->
       {ok, State};
  -handle_event(Event, LogFunc) ->
  +handle_event(Event, #eh_state{log_func = LogFunc} = State) ->
       case lists:keyfind(sasl, 1, application:which_applications()) of
   	false ->
   	    sasl_not_started;
  
positive.code: 
  
  %% CTH Callbacks
  -export([id/1, init/2, post_init_per_group/4, pre_end_per_group/3,
  	 post_end_per_testcase/4]).
  
  %% Event handler Callbacks
  -export([init/1,
  
negative.code: 	    SReport = sasl_report:format_report(group_leader(), ErrLogType,
  						tag_event(Event)),
  	    if is_list(SReport) ->
  		    SaslHeader = format_header(State),
  		    ct_logs:LogFunc(sasl, ?STD_IMPORTANCE, SaslHeader, SReport, []);
  	       true -> %% Report is an atom if no logging is to be done
  		    ignore
  	    end
  