aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-06-08 14:21:47 +0200
committerSiri Hansen <[email protected]>2018-06-08 14:39:38 +0200
commitba4b23c2d1cd07d754518201a5686f09cb1332d2 (patch)
treec99bc16907c61315453a30effd5f04d483a9c2cc /lib/kernel
parentc8c1c67d331b5d1ec8cd3cdad5d8231063d7c5d8 (diff)
downloadotp-ba4b23c2d1cd07d754518201a5686f09cb1332d2.tar.gz
otp-ba4b23c2d1cd07d754518201a5686f09cb1332d2.tar.bz2
otp-ba4b23c2d1cd07d754518201a5686f09cb1332d2.zip
[logger] Change base OTP domain from [beam,erlang,otp] to [otp]
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/application_controller.erl4
-rw-r--r--lib/kernel/src/error_logger.erl2
-rw-r--r--lib/kernel/src/logger.erl4
-rw-r--r--lib/kernel/src/logger_internal.hrl3
-rw-r--r--lib/kernel/test/logger_env_var_SUITE.erl42
-rw-r--r--lib/kernel/test/logger_legacy_SUITE.erl6
6 files changed, 22 insertions, 39 deletions
diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl
index ff5df667b5..d5a632ef6f 100644
--- a/lib/kernel/src/application_controller.erl
+++ b/lib/kernel/src/application_controller.erl
@@ -1914,7 +1914,7 @@ info_started(Name, Node) ->
?LOG_INFO(#{label=>{application_controller,progress},
report=>[{application, Name},
{started_at, Node}]},
- #{domain=>[beam,erlang,otp,sasl],
+ #{domain=>[otp,sasl],
report_cb=>fun logger:format_otp_report/1,
logger_formatter=>#{title=>"PROGRESS REPORT"},
error_logger=>#{tag=>info_report,type=>progress}}).
@@ -1924,7 +1924,7 @@ info_exited(Name, Reason, Type) ->
report=>[{application, Name},
{exited, Reason},
{type, Type}]},
- #{domain=>[beam,erlang,otp],
+ #{domain=>[otp],
report_cb=>fun logger:format_otp_report/1,
error_logger=>#{tag=>info_report,type=>std_info}}).
diff --git a/lib/kernel/src/error_logger.erl b/lib/kernel/src/error_logger.erl
index b3957d0c7e..d54c9d59b4 100644
--- a/lib/kernel/src/error_logger.erl
+++ b/lib/kernel/src/error_logger.erl
@@ -539,7 +539,7 @@ tty(true) ->
logger:add_handler(error_logger_tty_true,logger_std_h,
#{filter_default=>stop,
filters=>?DEFAULT_HANDLER_FILTERS(
- [beam,erlang,otp]),
+ [otp]),
formatter=>{?DEFAULT_FORMATTER,
?DEFAULT_FORMAT_CONFIG},
logger_std_h=>#{type=>standard_io}})
diff --git a/lib/kernel/src/logger.erl b/lib/kernel/src/logger.erl
index 3beb3102fa..907e2035f1 100644
--- a/lib/kernel/src/logger.erl
+++ b/lib/kernel/src/logger.erl
@@ -731,7 +731,7 @@ init_default_config(Type) ->
get_default_handler_filters() ->
case application:get_env(kernel, logger_sasl_compatible, false) of
true ->
- ?DEFAULT_HANDLER_FILTERS([beam,erlang,otp]);
+ ?DEFAULT_HANDLER_FILTERS([otp]);
false ->
Extra =
case application:get_env(kernel, logger_progress_reports, stop) of
@@ -741,7 +741,7 @@ get_default_handler_filters() ->
[{stop_progress,
{fun logger_filters:progress/2,stop}}]
end,
- Extra ++ ?DEFAULT_HANDLER_FILTERS([beam,erlang,otp,sasl])
+ Extra ++ ?DEFAULT_HANDLER_FILTERS([otp,sasl])
end.
get_logger_env() ->
diff --git a/lib/kernel/src/logger_internal.hrl b/lib/kernel/src/logger_internal.hrl
index fedd6db370..1325e38f74 100644
--- a/lib/kernel/src/logger_internal.hrl
+++ b/lib/kernel/src/logger_internal.hrl
@@ -23,8 +23,7 @@
-define(HANDLER_KEY,'$handler_config$').
-define(LOGGER_META_KEY,'$logger_metadata$').
-define(STANDARD_HANDLER, default).
--define(DEFAULT_HANDLER_FILTERS,
- ?DEFAULT_HANDLER_FILTERS([beam,erlang,otp])).
+-define(DEFAULT_HANDLER_FILTERS,?DEFAULT_HANDLER_FILTERS([otp])).
-define(DEFAULT_HANDLER_FILTERS(Domain),
[{remote_gl,{fun logger_filters:remote_gl/2,stop}},
{domain,{fun logger_filters:domain/2,{log,super,Domain}}},
diff --git a/lib/kernel/test/logger_env_var_SUITE.erl b/lib/kernel/test/logger_env_var_SUITE.erl
index ed9e5b795a..03827c9825 100644
--- a/lib/kernel/test/logger_env_var_SUITE.erl
+++ b/lib/kernel/test/logger_env_var_SUITE.erl
@@ -82,8 +82,7 @@ default(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -95,8 +94,7 @@ default_sasl_compatible(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp]}}} = lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
true = lists:keymember(sasl,1,Hs),
@@ -107,8 +105,7 @@ error_logger_tty(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -121,8 +118,7 @@ error_logger_tty_sasl_compatible(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp]}}} = lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
true = lists:keymember(sasl,1,Hs),
@@ -138,8 +134,7 @@ error_logger_false(Config) ->
debug = maps:get(level,SimpleC),
notice = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,SimpleFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,SimpleFilters),
true = lists:keymember(stop_progress,1,SimpleFilters),
false = lists:keymember(sasl,1,Hs),
ok.
@@ -155,8 +150,7 @@ error_logger_false_progress(Config) ->
debug = maps:get(level,SimpleC),
notice = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,SimpleFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,SimpleFilters),
false = lists:keymember(stop_progress,1,SimpleFilters),
false = lists:keymember(sasl,1,Hs),
ok.
@@ -172,8 +166,7 @@ error_logger_false_sasl_compatible(Config) ->
debug = maps:get(level,SimpleC),
notice = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,super,[beam,erlang,otp]}}} =
- lists:keyfind(domain,1,SimpleFilters),
+ {domain,{_,{log,super,[otp]}}} = lists:keyfind(domain,1,SimpleFilters),
false = lists:keymember(stop_progress,1,SimpleFilters),
true = lists:keymember(sasl,1,Hs),
ok.
@@ -220,8 +213,7 @@ logger_file(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -243,8 +235,7 @@ logger_file_sasl_compatible(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp]}}} = lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
true = lists:keymember(sasl,1,Hs),
@@ -266,8 +257,7 @@ logger_file_log_progress(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -353,8 +343,7 @@ logger_filters(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -406,8 +395,7 @@ logger_module_level(Config) ->
{?STANDARD_HANDLER,logger_std_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
false = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -428,8 +416,7 @@ logger_disk_log(Config) ->
{?STANDARD_HANDLER,logger_disk_log_h,StdC} = lists:keyfind(?STANDARD_HANDLER,1,Hs),
debug = maps:get(level,StdC),
StdFilters = maps:get(filters,StdC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,StdFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,StdFilters),
true = lists:keymember(stop_progress,1,StdFilters),
false = lists:keymember(simple,1,Hs),
false = lists:keymember(sasl,1,Hs),
@@ -465,8 +452,7 @@ logger_undefined(Config) ->
debug = maps:get(level,SimpleC),
info = maps:get(level,L),
SimpleFilters = maps:get(filters,SimpleC),
- {domain,{_,{log,super,[beam,erlang,otp,sasl]}}} =
- lists:keyfind(domain,1,SimpleFilters),
+ {domain,{_,{log,super,[otp,sasl]}}} = lists:keyfind(domain,1,SimpleFilters),
true = lists:keymember(stop_progress,1,SimpleFilters),
false = lists:keymember(sasl,1,Hs),
ok.
diff --git a/lib/kernel/test/logger_legacy_SUITE.erl b/lib/kernel/test/logger_legacy_SUITE.erl
index cfba35e43f..180db9f51a 100644
--- a/lib/kernel/test/logger_legacy_SUITE.erl
+++ b/lib/kernel/test/logger_legacy_SUITE.erl
@@ -67,14 +67,12 @@ end_per_suite(_Config) ->
init_per_group(std, Config) ->
ok = logger:set_handler_config(
error_logger,filters,
- [{domain,{fun logger_filters:domain/2,
- {log,super,[beam,erlang,otp]}}}]),
+ [{domain,{fun logger_filters:domain/2,{log,super,[otp]}}}]),
Config;
init_per_group(sasl, Config) ->
ok = logger:set_handler_config(
error_logger,filters,
- [{domain,{fun logger_filters:domain/2,
- {log,super,[beam,erlang,otp,sasl]}}}]),
+ [{domain,{fun logger_filters:domain/2,{log,super,[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