aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger_server.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-06-06 15:58:12 +0200
committerSiri Hansen <[email protected]>2018-06-08 14:47:34 +0200
commit7f6e61ca0d752c780ffadd7aacf29aaab0783c78 (patch)
tree82081b9f1cd98a94b3ce6e6f1257e7fa57e0cb93 /lib/kernel/src/logger_server.erl
parent2ab3e91a44032cab2b173efc33b5d9589eec4864 (diff)
downloadotp-7f6e61ca0d752c780ffadd7aacf29aaab0783c78.tar.gz
otp-7f6e61ca0d752c780ffadd7aacf29aaab0783c78.tar.bz2
otp-7f6e61ca0d752c780ffadd7aacf29aaab0783c78.zip
[logger] Change name of handler specific config field from ?MODULE to 'config'
And add field 'module' in handler config.
Diffstat (limited to 'lib/kernel/src/logger_server.erl')
-rw-r--r--lib/kernel/src/logger_server.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/kernel/src/logger_server.erl b/lib/kernel/src/logger_server.erl
index c7d386ab82..7df762053e 100644
--- a/lib/kernel/src/logger_server.erl
+++ b/lib/kernel/src/logger_server.erl
@@ -53,7 +53,7 @@ add_handler(Id,Module,Config0) ->
{ok,ok} ->
case sanity_check(Id,Config0) of
ok ->
- Default = default_config(Id),
+ Default = default_config(Id,Module),
Config = maps:merge(Default,Config0),
call({add_handler,Id,Module,Config});
Error ->
@@ -141,7 +141,7 @@ init([]) ->
PrimaryConfig = maps:merge(default_config(primary),
#{handlers=>[simple]}),
logger_config:create(Tid,primary,PrimaryConfig),
- SimpleConfig0 = maps:merge(default_config(simple),
+ SimpleConfig0 = maps:merge(default_config(simple,logger_simple_h),
#{filter_default=>stop,
filters=>?DEFAULT_HANDLER_FILTERS}),
%% If this fails, then the node should crash
@@ -365,6 +365,8 @@ default_config(Id) ->
filters=>[],
filter_default=>log,
formatter=>{?DEFAULT_FORMATTER,#{}}}.
+default_config(Id,Module) ->
+ (default_config(Id))#{module=>Module}.
sanity_check(Owner,Key,Value) ->
sanity_check_1(Owner,[{Key,Value}]).