aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-05-21 16:47:46 +0200
committerSiri Hansen <[email protected]>2018-05-23 11:11:44 +0200
commitd35c100a10239edc669b465a2176000ffcc1300f (patch)
tree6a8c158a14d10fd092970b4e73da2b4cd74535b8 /lib/kernel/test
parente484181ecc5c3e2928d10632138837eba3c3229e (diff)
downloadotp-d35c100a10239edc669b465a2176000ffcc1300f.tar.gz
otp-d35c100a10239edc669b465a2176000ffcc1300f.tar.bz2
otp-d35c100a10239edc669b465a2176000ffcc1300f.zip
Change Compare parameter to logger_filters:domain/2
This configuration option has been removed. logger_formatter will read the utc_log configuration parameter and format the timestamp accordingly.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/logger_env_var_SUITE.erl28
-rw-r--r--lib/kernel/test/logger_filters_SUITE.erl134
-rw-r--r--lib/kernel/test/logger_legacy_SUITE.erl4
3 files changed, 83 insertions, 83 deletions
diff --git a/lib/kernel/test/logger_env_var_SUITE.erl b/lib/kernel/test/logger_env_var_SUITE.erl
index 32612d616e..081d4f0a80 100644
--- a/lib/kernel/test/logger_env_var_SUITE.erl
+++ b/lib/kernel/test/logger_env_var_SUITE.erl
@@ -82,7 +82,7 @@ default(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -95,7 +95,7 @@ default_sasl_compatible(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp]}}} =
lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -107,7 +107,7 @@ error_logger_tty(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -121,7 +121,7 @@ error_logger_tty_sasl_compatible(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp]}}} =
lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -138,7 +138,7 @@ error_logger_false(Config) ->
info = maps:get(level,SimpleC),
notice = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,SimpleFilters),
true = lists:keymember(stop_progress,1,SimpleFilters),
false = lists:keymember(sasl_h,1,Hs),
@@ -155,7 +155,7 @@ error_logger_false_progress(Config) ->
info = maps:get(level,SimpleC),
notice = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,SimpleFilters),
false = lists:keymember(stop_progress,1,SimpleFilters),
false = lists:keymember(sasl_h,1,Hs),
@@ -172,7 +172,7 @@ error_logger_false_sasl_compatible(Config) ->
info = maps:get(level,SimpleC),
notice = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp]}}} =
lists:keyfind(domain,1,SimpleFilters),
false = lists:keymember(stop_progress,1,SimpleFilters),
true = lists:keymember(sasl_h,1,Hs),
@@ -220,7 +220,7 @@ logger_file(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -243,7 +243,7 @@ logger_file_sasl_compatible(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp]}}} =
lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -266,7 +266,7 @@ logger_file_log_progress(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -353,7 +353,7 @@ logger_filters(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -406,7 +406,7 @@ logger_module_level(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -428,7 +428,7 @@ logger_disk_log(Config) ->
{?STANDARD_HANDLER,logger_disk_log_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
info = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(logger_simple,1,Hs),
@@ -465,7 +465,7 @@ logger_undefined(Config) ->
info = maps:get(level,SimpleC),
info = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,prefix_of,[beam,erlang,otp,sasl]}}} =
+ {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
lists:keyfind(domain,1,SimpleFilters),
true = lists:keymember(stop_progress,1,SimpleFilters),
false = lists:keymember(sasl_h,1,Hs),
diff --git a/lib/kernel/test/logger_filters_SUITE.erl b/lib/kernel/test/logger_filters_SUITE.erl
index c4b31370ff..11cce8fd20 100644
--- a/lib/kernel/test/logger_filters_SUITE.erl
+++ b/lib/kernel/test/logger_filters_SUITE.erl
@@ -75,79 +75,79 @@ all() ->
remote_gl].
domain(_Config) ->
- L1 = logger_filters:domain(L1=?dlog([]),{log,prefix_of,[]}),
- stop = logger_filters:domain(?dlog([]),{stop,prefix_of,[]}),
- L2 = logger_filters:domain(L2=?dlog([]),{log,starts_with,[]}),
- stop = logger_filters:domain(?dlog([]),{stop,starts_with,[]}),
- L3 = logger_filters:domain(L3=?dlog([]),{log,equals,[]}),
- stop = logger_filters:domain(?dlog([]),{stop,equals,[]}),
- ignore = logger_filters:domain(?dlog([]),{log,differs,[]}),
- ignore = logger_filters:domain(?dlog([]),{stop,differs,[]}),
- ignore = logger_filters:domain(?dlog([]),{log,no_domain,[]}),
- ignore = logger_filters:domain(?dlog([]),{stop,no_domain,[]}),
-
- L4 = logger_filters:domain(L4=?dlog([a]),{log,prefix_of,[a,b]}),
- stop = logger_filters:domain(?dlog([a]),{stop,prefix_of,[a,b]}),
- ignore = logger_filters:domain(?dlog([a]),{log,starts_with,[a,b]}),
- ignore = logger_filters:domain(?dlog([a]),{stop,starts_with,[a,b]}),
- ignore = logger_filters:domain(?dlog([a]),{log,equals,[a,b]}),
- ignore = logger_filters:domain(?dlog([a]),{stop,equals,[a,b]}),
- L5 = logger_filters:domain(L5=?dlog([a]),{log,differs,[a,b]}),
- stop = logger_filters:domain(?dlog([a]),{stop,differs,[a,b]}),
- ignore = logger_filters:domain(?dlog([a]),{log,no_domain,[a,b]}),
- ignore = logger_filters:domain(?dlog([a]),{stop,no_domain,[a,b]}),
-
- ignore = logger_filters:domain(?dlog([a,b]),{log,prefix_of,[a]}),
- ignore = logger_filters:domain(?dlog([a,b]),{stop,prefix_of,[a]}),
- L6 = logger_filters:domain(L6=?dlog([a,b]),{log,starts_with,[a]}),
- stop = logger_filters:domain(?dlog([a,b]),{stop,starts_with,[a]}),
- ignore = logger_filters:domain(?dlog([a,b]),{log,equals,[a]}),
- ignore = logger_filters:domain(?dlog([a,b]),{stop,equals,[a]}),
- L7 = logger_filters:domain(L7=?dlog([a,b]),{log,differs,[a]}),
- stop = logger_filters:domain(?dlog([a,b]),{stop,differs,[a]}),
- ignore = logger_filters:domain(?dlog([a,b]),{log,no_domain,[a]}),
- ignore = logger_filters:domain(?dlog([a,b]),{stop,no_domain,[a]}),
-
- ignore = logger_filters:domain(?ndlog,{log,prefix_of,[a]}),
- ignore = logger_filters:domain(?ndlog,{stop,prefix_of,[a]}),
- ignore = logger_filters:domain(?ndlog,{log,starts_with,[a]}),
- ignore = logger_filters:domain(?ndlog,{stop,starts_with,[a]}),
- ignore = logger_filters:domain(?ndlog,{log,equals,[a]}),
- ignore = logger_filters:domain(?ndlog,{stop,equals,[a]}),
- L8 = logger_filters:domain(L8=?ndlog,{log,differs,[a]}),
- stop = logger_filters:domain(?ndlog,{stop,differs,[a]}),
- L9 = logger_filters:domain(L9=?ndlog,{log,no_domain,[a]}),
- stop = logger_filters:domain(?ndlog,{stop,no_domain,[a]}),
-
- L10 = logger_filters:domain(L10=?dlog([a,b,c,d]),{log,prefix_of,[a,b,c,d]}),
- stop = logger_filters:domain(?dlog([a,b,c,d]),{stop,prefix_of,[a,b,c,d]}),
- L11 = logger_filters:domain(L11=?dlog([a,b,c,d]),{log,starts_with,[a,b,c,d]}),
- stop = logger_filters:domain(?dlog([a,b,c,d]),{stop,starts_with,[a,b,c,d]}),
- L12 = logger_filters:domain(L12=?dlog([a,b,c,d]),{log,equals,[a,b,c,d]}),
- stop = logger_filters:domain(?dlog([a,b,c,d]),{stop,equals,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog([a,b,c,d]),{log,differs,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog([a,b,c,d]),{stop,differs,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog([a,b,c,d]),{log,no_domain,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog([a,b,c,d]),{stop,no_domain,[a,b,c,d]}),
+ L1 = logger_filters:domain(L1=?dlog([]),{log,super,[]}),
+ stop = logger_filters:domain(?dlog([]),{stop,super,[]}),
+ L2 = logger_filters:domain(L2=?dlog([]),{log,sub,[]}),
+ stop = logger_filters:domain(?dlog([]),{stop,sub,[]}),
+ L3 = logger_filters:domain(L3=?dlog([]),{log,equal,[]}),
+ stop = logger_filters:domain(?dlog([]),{stop,equal,[]}),
+ ignore = logger_filters:domain(?dlog([]),{log,not_equal,[]}),
+ ignore = logger_filters:domain(?dlog([]),{stop,not_equal,[]}),
+ ignore = logger_filters:domain(?dlog([]),{log,undefined,[]}),
+ ignore = logger_filters:domain(?dlog([]),{stop,undefined,[]}),
+
+ L4 = logger_filters:domain(L4=?dlog([a]),{log,super,[a,b]}),
+ stop = logger_filters:domain(?dlog([a]),{stop,super,[a,b]}),
+ ignore = logger_filters:domain(?dlog([a]),{log,sub,[a,b]}),
+ ignore = logger_filters:domain(?dlog([a]),{stop,sub,[a,b]}),
+ ignore = logger_filters:domain(?dlog([a]),{log,equal,[a,b]}),
+ ignore = logger_filters:domain(?dlog([a]),{stop,equal,[a,b]}),
+ L5 = logger_filters:domain(L5=?dlog([a]),{log,not_equal,[a,b]}),
+ stop = logger_filters:domain(?dlog([a]),{stop,not_equal,[a,b]}),
+ ignore = logger_filters:domain(?dlog([a]),{log,undefined,[a,b]}),
+ ignore = logger_filters:domain(?dlog([a]),{stop,undefined,[a,b]}),
+
+ ignore = logger_filters:domain(?dlog([a,b]),{log,super,[a]}),
+ ignore = logger_filters:domain(?dlog([a,b]),{stop,super,[a]}),
+ L6 = logger_filters:domain(L6=?dlog([a,b]),{log,sub,[a]}),
+ stop = logger_filters:domain(?dlog([a,b]),{stop,sub,[a]}),
+ ignore = logger_filters:domain(?dlog([a,b]),{log,equal,[a]}),
+ ignore = logger_filters:domain(?dlog([a,b]),{stop,equal,[a]}),
+ L7 = logger_filters:domain(L7=?dlog([a,b]),{log,not_equal,[a]}),
+ stop = logger_filters:domain(?dlog([a,b]),{stop,not_equal,[a]}),
+ ignore = logger_filters:domain(?dlog([a,b]),{log,undefined,[a]}),
+ ignore = logger_filters:domain(?dlog([a,b]),{stop,undefined,[a]}),
+
+ ignore = logger_filters:domain(?ndlog,{log,super,[a]}),
+ ignore = logger_filters:domain(?ndlog,{stop,super,[a]}),
+ ignore = logger_filters:domain(?ndlog,{log,sub,[a]}),
+ ignore = logger_filters:domain(?ndlog,{stop,sub,[a]}),
+ ignore = logger_filters:domain(?ndlog,{log,equal,[a]}),
+ ignore = logger_filters:domain(?ndlog,{stop,equal,[a]}),
+ L8 = logger_filters:domain(L8=?ndlog,{log,not_equal,[a]}),
+ stop = logger_filters:domain(?ndlog,{stop,not_equal,[a]}),
+ L9 = logger_filters:domain(L9=?ndlog,{log,undefined,[a]}),
+ stop = logger_filters:domain(?ndlog,{stop,undefined,[a]}),
+
+ L10 = logger_filters:domain(L10=?dlog([a,b,c,d]),{log,super,[a,b,c,d]}),
+ stop = logger_filters:domain(?dlog([a,b,c,d]),{stop,super,[a,b,c,d]}),
+ L11 = logger_filters:domain(L11=?dlog([a,b,c,d]),{log,sub,[a,b,c,d]}),
+ stop = logger_filters:domain(?dlog([a,b,c,d]),{stop,sub,[a,b,c,d]}),
+ L12 = logger_filters:domain(L12=?dlog([a,b,c,d]),{log,equal,[a,b,c,d]}),
+ stop = logger_filters:domain(?dlog([a,b,c,d]),{stop,equal,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog([a,b,c,d]),{log,not_equal,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog([a,b,c,d]),{stop,not_equal,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog([a,b,c,d]),{log,undefined,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog([a,b,c,d]),{stop,undefined,[a,b,c,d]}),
%% A domain field in meta which is not a list is allowed by the
%% filter, but since MatchDomain is always a list of atoms, only
- %% Action=differs can ever match.
- ignore = logger_filters:domain(?dlog(dummy),{log,prefix_of,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{stop,prefix_of,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{log,starts_with,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{stop,starts_with,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{log,equals,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{stop,equals,[a,b,c,d]}),
- L13 = logger_filters:domain(L13=?dlog(dummy),{log,differs,[a,b,c,d]}),
- stop = logger_filters:domain(?dlog(dummy),{stop,differs,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{log,no_domain,[a,b,c,d]}),
- ignore = logger_filters:domain(?dlog(dummy),{stop,no_domain,[a,b,c,d]}),
+ %% Action=not_equal can ever match.
+ ignore = logger_filters:domain(?dlog(dummy),{log,super,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{stop,super,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{log,sub,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{stop,sub,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{log,equal,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{stop,equal,[a,b,c,d]}),
+ L13 = logger_filters:domain(L13=?dlog(dummy),{log,not_equal,[a,b,c,d]}),
+ stop = logger_filters:domain(?dlog(dummy),{stop,not_equal,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{log,undefined,[a,b,c,d]}),
+ ignore = logger_filters:domain(?dlog(dummy),{stop,undefined,[a,b,c,d]}),
{error,badarg} = ?TRY(logger_filters:domain(?ndlog,bad)),
- {error,badarg} = ?TRY(logger_filters:domain(?ndlog,{bad,prefix_of,[]})),
+ {error,badarg} = ?TRY(logger_filters:domain(?ndlog,{bad,super,[]})),
{error,badarg} = ?TRY(logger_filters:domain(?ndlog,{log,bad,[]})),
- {error,badarg} = ?TRY(logger_filters:domain(?ndlog,{log,prefix_of,bad})),
+ {error,badarg} = ?TRY(logger_filters:domain(?ndlog,{log,super,bad})),
ok.
diff --git a/lib/kernel/test/logger_legacy_SUITE.erl b/lib/kernel/test/logger_legacy_SUITE.erl
index b59f5f7758..cfba35e43f 100644
--- a/lib/kernel/test/logger_legacy_SUITE.erl
+++ b/lib/kernel/test/logger_legacy_SUITE.erl
@@ -68,13 +68,13 @@ init_per_group(std, Config) ->
ok = logger:set_handler_config(
error_logger,filters,
[{domain,{fun logger_filters:domain/2,
- {log,prefix_of,[beam,erlang,otp]}}}]),
+ {log,super,[beam,erlang,otp]}}}]),
Config;
init_per_group(sasl, Config) ->
ok = logger:set_handler_config(
error_logger,filters,
[{domain,{fun logger_filters:domain/2,
- {log,prefix_of,[beam,erlang,otp,sasl]}}}]),
+ {log,super,[beam,erlang,otp,sasl]}}}]),
%% cth_log_redirect checks if sasl is started before displaying
%% any sasl reports - so just to see the real sasl reports in tc