From b732d1df54c9567cf15015bf549b812252299d9f Mon Sep 17 00:00:00 2001 From: Roberto Aloi Date: Mon, 16 Sep 2013 11:05:56 +0200 Subject: The gen_event callback module expects terminate/2, not terminate/1 --- lib/common_test/src/cth_log_redirect.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/common_test') diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl index 4ee7e48a67..b7f0e1fd7f 100644 --- a/lib/common_test/src/cth_log_redirect.erl +++ b/lib/common_test/src/cth_log_redirect.erl @@ -34,7 +34,7 @@ %% Event handler Callbacks -export([init/1, handle_event/2, handle_call/2, handle_info/2, - terminate/1]). + terminate/2]). %% Other -export([handle_remote_events/1]). @@ -184,7 +184,7 @@ handle_call({handle_remote_events,Bool}, State) -> handle_call(_Query, _State) -> {error, bad_query}. -terminate(_State) -> +terminate(_Arg, _State) -> error_logger:delete_report_handler(?MODULE), []. -- cgit v1.2.3 From 8dfd57ab8581813bee1404e5fe2d74081d9c1c0a Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Fri, 11 Oct 2013 15:18:30 +0200 Subject: common_test: added code_change/3 for gen_event behaviour --- lib/common_test/src/cth_log_redirect.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/common_test') diff --git a/lib/common_test/src/cth_log_redirect.erl b/lib/common_test/src/cth_log_redirect.erl index b7f0e1fd7f..f5e769e1ba 100644 --- a/lib/common_test/src/cth_log_redirect.erl +++ b/lib/common_test/src/cth_log_redirect.erl @@ -34,13 +34,15 @@ %% Event handler Callbacks -export([init/1, handle_event/2, handle_call/2, handle_info/2, - terminate/2]). + terminate/2, code_change/3]). %% Other -export([handle_remote_events/1]). -include("ct.hrl"). +-behaviour(gen_event). + -record(eh_state, {log_func, curr_suite, curr_group, @@ -236,3 +238,6 @@ format_header(#eh_state{curr_suite = Suite, curr_func = TC}) -> io_lib:format("System report during ~w:~w/1 in ~w", [Suite,TC,Group]). + +code_change(_OldVsn, State, _Extra) -> + {ok, State}. -- cgit v1.2.3