aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/cth_conn_log.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-04-01 16:50:20 +0200
committerPeter Andersson <[email protected]>2014-04-02 17:22:13 +0200
commit61faea7ded93df8d444adf7079a7be2cc9e0f176 (patch)
treec81b933c3aa416f2c7481b5580d73ffc3ed32ddf /lib/common_test/src/cth_conn_log.erl
parentac79481c9bd9894616213a5b7eccf6d5f94cbed8 (diff)
downloadotp-61faea7ded93df8d444adf7079a7be2cc9e0f176.tar.gz
otp-61faea7ded93df8d444adf7079a7be2cc9e0f176.tar.bz2
otp-61faea7ded93df8d444adf7079a7be2cc9e0f176.zip
Document new ct_telnet logging features
OTP-11440
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}.