aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/cth_conn_log.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-04-03 10:13:16 +0200
committerPeter Andersson <[email protected]>2014-04-03 10:13:16 +0200
commit4f01844fc9feda7366c2995fa87bbbf862ea7e69 (patch)
tree2815738f6198d3176e467f70c812bb268a187bff /lib/common_test/src/cth_conn_log.erl
parenta6f1a39b615885c2ee4cef53c2deaa996aad3f78 (diff)
parent3fab0d4b7c7fc39cc5b92dd7f19743780ccd20b5 (diff)
downloadotp-4f01844fc9feda7366c2995fa87bbbf862ea7e69.tar.gz
otp-4f01844fc9feda7366c2995fa87bbbf862ea7e69.tar.bz2
otp-4f01844fc9feda7366c2995fa87bbbf862ea7e69.zip
Merge branch 'peppe/common_test/otp_17_doc'
* peppe/common_test/otp_17_doc: Document the abort_if_missing_suites functionality Document changes in the CT hooks API and the event message protocol Document new ct_telnet logging features
Diffstat (limited to 'lib/common_test/src/cth_conn_log.erl')
-rw-r--r--lib/common_test/src/cth_conn_log.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/common_test/src/cth_conn_log.erl b/lib/common_test/src/cth_conn_log.erl
index 0e6c877c5d..1e60f2751e 100644
--- a/lib/common_test/src/cth_conn_log.erl
+++ b/lib/common_test/src/cth_conn_log.erl
@@ -91,12 +91,15 @@ merge_log_info([{Mod,ConfOpts}|ConfList],HookList) ->
{value,{_,HookOpts},HL1} ->
{ConfOpts ++ HookOpts, HL1} % ConfOpts overwrites HookOpts!
end,
- [{Mod,get_log_opts(Opts)} | merge_log_info(ConfList,HookList1)];
+ [{Mod,get_log_opts(Mod,Opts)} | merge_log_info(ConfList,HookList1)];
merge_log_info([],HookList) ->
- [{Mod,get_log_opts(Opts)} || {Mod,Opts} <- HookList].
+ [{Mod,get_log_opts(Mod,Opts)} || {Mod,Opts} <- HookList].
-get_log_opts(Opts) ->
- LogType = proplists:get_value(log_type,Opts,html),
+get_log_opts(Mod,Opts) ->
+ DefaultLogType = if Mod == ct_telnet -> raw;
+ true -> html
+ end,
+ LogType = proplists:get_value(log_type,Opts,DefaultLogType),
Hosts = proplists:get_value(hosts,Opts,[]),
{LogType,Hosts}.