aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2018-06-08 18:41:16 +0200
committerSiri Hansen <[email protected]>2018-06-11 15:01:42 +0200
commit98371223a4056459957552f1243f499c4003628e (patch)
tree3e6db7d9433ca21c368085c7955bbbb3214fd48b /lib
parente721674309b683f37306e9dd206aa8521fa871cf (diff)
downloadotp-98371223a4056459957552f1243f499c4003628e.tar.gz
otp-98371223a4056459957552f1243f499c4003628e.tar.bz2
otp-98371223a4056459957552f1243f499c4003628e.zip
[logger] Move the disk log options to the handler config map
Conflicts: lib/kernel/src/logger_disk_log_h.erl
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/logger.erl3
-rw-r--r--lib/kernel/src/logger_disk_log_h.erl135
-rw-r--r--lib/kernel/src/logger_std_h.erl52
-rw-r--r--lib/kernel/test/logger_disk_log_h_SUITE.erl100
-rw-r--r--lib/kernel/test/logger_env_var_SUITE.erl4
-rw-r--r--lib/kernel/test/logger_simple_h_SUITE.erl2
-rw-r--r--lib/kernel/test/logger_std_h_SUITE.erl2
7 files changed, 151 insertions, 147 deletions
diff --git a/lib/kernel/src/logger.erl b/lib/kernel/src/logger.erl
index 7f10c27bae..7d121f22fe 100644
--- a/lib/kernel/src/logger.erl
+++ b/lib/kernel/src/logger.erl
@@ -104,8 +104,7 @@
module => module(),
filter_default => log | stop,
filters => [{filter_id(),filter()}],
- formatter => {module(),formatter_config()},
- atom() => term()}.
+ formatter => {module(),formatter_config()}}.
-type timestamp() :: integer().
-type formatter_config() :: #{atom() => term()}.
diff --git a/lib/kernel/src/logger_disk_log_h.erl b/lib/kernel/src/logger_disk_log_h.erl
index 8a456f72b1..a074d0210e 100644
--- a/lib/kernel/src/logger_disk_log_h.erl
+++ b/lib/kernel/src/logger_disk_log_h.erl
@@ -133,12 +133,25 @@ adding_handler(#{id:=Name}=Config) ->
%%%-----------------------------------------------------------------
%%% Updating handler config
-changing_config(OldConfig=#{id:=Name, disk_log_opts:=DLOpts, config:=HConfig},
- NewConfig=#{id:=Name, disk_log_opts:=DLOpts}) ->
+changing_config(OldConfig = #{id:=Name, config:=OldHConfig},
+ NewConfig = #{id:=Name, config:=NewHConfig}) ->
+ #{type:=Type, file:=File, max_no_files:=MaxFs,
+ max_no_bytes:=MaxBytes} = OldHConfig,
+ case NewHConfig of
+ #{type:=Type, file:=File, max_no_files:=MaxFs,
+ max_no_bytes:=MaxBytes} ->
+ changing_config1(OldConfig, NewConfig);
+ _ ->
+ {error,{illegal_config_change,OldConfig,NewConfig}}
+ end;
+changing_config(OldConfig, NewConfig) ->
+ {error,{illegal_config_change,OldConfig,NewConfig}}.
+
+changing_config1(OldConfig=#{config:=OldHConfig}, NewConfig) ->
case check_config(changing, NewConfig) of
{ok,NewConfig1 = #{config:=NewHConfig}} ->
#{handler_pid:=HPid,
- mode_tab:=ModeTab} = HConfig,
+ mode_tab:=ModeTab} = OldHConfig,
NewHConfig1 = NewHConfig#{handler_pid=>HPid,
mode_tab=>ModeTab},
NewConfig2 = NewConfig1#{config=>NewHConfig1},
@@ -151,73 +164,58 @@ changing_config(OldConfig=#{id:=Name, disk_log_opts:=DLOpts, config:=HConfig},
end;
Error ->
Error
- end;
-changing_config(OldConfig, NewConfig) ->
- {error,{illegal_config_change,OldConfig,NewConfig}}.
+ end.
check_config(adding, #{id:=Name}=Config) ->
- %% Merge in defaults on handler level
- LogOpts0 = maps:get(disk_log_opts, Config, #{}),
- LogOpts = merge_default_logopts(Name, LogOpts0),
- case check_log_opts(maps:to_list(LogOpts)) of
+ %% merge handler specific config data
+ HConfig = merge_default_logopts(Name, maps:get(config, Config, #{})),
+ case check_h_config(maps:to_list(HConfig)) of
ok ->
- MyConfig = maps:get(config, Config, #{}),
- case check_my_config(maps:to_list(MyConfig)) of
- ok ->
- {ok,Config#{disk_log_opts=>LogOpts,
- config=>MyConfig}};
- Error ->
- Error
- end;
+ {ok,Config#{config=>HConfig}};
Error ->
Error
end;
check_config(changing, Config) ->
- MyConfig = maps:get(config, Config, #{}),
- case check_my_config(maps:to_list(MyConfig)) of
+ HConfig = maps:get(config, Config, #{}),
+ case check_h_config(maps:to_list(HConfig)) of
ok -> {ok,Config};
Error -> Error
end.
-merge_default_logopts(Name, LogOpts) ->
- Type = maps:get(type, LogOpts, wrap),
+merge_default_logopts(Name, HConfig) ->
+ Type = maps:get(type, HConfig, wrap),
{DefaultNoFiles,DefaultNoBytes} =
case Type of
halt -> {undefined,infinity};
_wrap -> {10,1048576}
end,
{ok,Dir} = file:get_cwd(),
- Default = #{file => filename:join(Dir,Name),
- max_no_files => DefaultNoFiles,
- max_no_bytes => DefaultNoBytes,
- type => Type},
- maps:merge(Default,LogOpts).
-
-check_log_opts([{file,File}|Opts]) when is_list(File) ->
- check_log_opts(Opts);
-check_log_opts([{max_no_files,undefined}|Opts]) ->
- check_log_opts(Opts);
-check_log_opts([{max_no_files,N}|Opts]) when is_integer(N), N>0 ->
- check_log_opts(Opts);
-check_log_opts([{max_no_bytes,infinity}|Opts]) ->
- check_log_opts(Opts);
-check_log_opts([{max_no_bytes,N}|Opts]) when is_integer(N), N>0 ->
- check_log_opts(Opts);
-check_log_opts([{type,Type}|Opts]) when Type==wrap; Type==halt ->
- check_log_opts(Opts);
-check_log_opts([Invalid|_]) ->
- {error,{invalid_config,disk_log_opt,Invalid}};
-check_log_opts([]) ->
- ok.
-
-check_my_config([Other | Config]) ->
+ Defaults = #{file => filename:join(Dir,Name),
+ max_no_files => DefaultNoFiles,
+ max_no_bytes => DefaultNoBytes,
+ type => Type},
+ maps:merge(Defaults, HConfig).
+
+check_h_config([{file,File}|Config]) when is_list(File) ->
+ check_h_config(Config);
+check_h_config([{max_no_files,undefined}|Config]) ->
+ check_h_config(Config);
+check_h_config([{max_no_files,N}|Config]) when is_integer(N), N>0 ->
+ check_h_config(Config);
+check_h_config([{max_no_bytes,infinity}|Config]) ->
+ check_h_config(Config);
+check_h_config([{max_no_bytes,N}|Config]) when is_integer(N), N>0 ->
+ check_h_config(Config);
+check_h_config([{type,Type}|Config]) when Type==wrap; Type==halt ->
+ check_h_config(Config);
+check_h_config([Other | Config]) ->
case logger_h_common:check_common_config(Other) of
valid ->
- check_my_config(Config);
+ check_h_config(Config);
invalid ->
{error,{invalid_config,?MODULE,Other}}
end;
-check_my_config([]) ->
+check_h_config([]) ->
ok.
%%%-----------------------------------------------------------------
@@ -244,16 +242,22 @@ log(LogEvent, Config = #{id := Name,
%%% gen_server callbacks
%%%===================================================================
-init([Name, Config = #{config := HConfig, disk_log_opts := LogOpts},
+init([Name,
+ Config = #{config := HConfig = #{file:=File,
+ type:=Type,
+ max_no_bytes:=MNB,
+ max_no_files:=MNF}},
State = #{dl_sync_int := DLSyncInt}]) ->
+
register(?name_to_reg_name(?MODULE,Name), self()),
process_flag(trap_exit, true),
process_flag(message_queue_data, off_heap),
?init_test_hooks(),
?start_observation(Name),
-
- case open_disk_log(Name, LogOpts) of
+
+ LogOpts = #{file=>File, type=>Type, max_no_bytes=>MNB, max_no_files=>MNF},
+ case open_disk_log(Name, File, Type, MNB, MNF) of
ok ->
try ets:new(Name, [public]) of
ModeTab ->
@@ -453,22 +457,21 @@ get_init_state() ->
%%% exist if the handler is registered with logger (and should not
%%% exist if the handler is not registered).
%%%
-%%% Config is the logger:handler_config() map containing a sub map
-%%% with any of the following associations:
+%%% Config is the logger:handler_config() map. Handler specific parameters
+%%% should be provided with a sub map associated with a key named
+%%% 'config', e.g:
%%%
-%%% Config = #{disk_log_opts => #{file => file:filename(),
-%%% max_no_bytes => integer(),
-%%% max_no_files => integer(),
-%%% type => wrap | halt}}.
+%%% Config = #{config => #{sync_mode_qlen => 50}
%%%
-%%% This map will be merged with the logger configuration data for
-%%% the disk_log LogName. If type == halt, then max_no_files is
-%%% ignored.
+%%% The 'config' sub map will also contain parameters for configuring
+%%% the disk_log:
%%%
-%%% Handler specific config should be provided with a sub map associated
-%%% with a key named 'config', e.g:
+%%% Config = #{config => #{file => file:filename(),
+%%% max_no_bytes => integer(),
+%%% max_no_files => integer(),
+%%% type => wrap | halt}}.
%%%
-%%% Config = #{config => #{sync_mode_qlen => 50}
+%%% If type == halt, then max_no_files is ignored.
%%%
%%% The disk_log handler process is linked to logger_sup, which is
%%% part of the kernel application's supervision tree.
@@ -640,11 +643,7 @@ log_handler_info(Name, Format, Args, State) ->
ok.
-open_disk_log(Name, LogOpts) ->
- #{file := File,
- max_no_bytes := MaxNoBytes,
- max_no_files := MaxNoFiles,
- type := Type} = LogOpts,
+open_disk_log(Name, File, Type, MaxNoBytes, MaxNoFiles) ->
case filelib:ensure_dir(File) of
ok ->
Size =
diff --git a/lib/kernel/src/logger_std_h.erl b/lib/kernel/src/logger_std_h.erl
index 29efde52a9..ce9daa50ab 100644
--- a/lib/kernel/src/logger_std_h.erl
+++ b/lib/kernel/src/logger_std_h.erl
@@ -135,17 +135,17 @@ adding_handler(#{id:=Name}=Config) ->
%%%-----------------------------------------------------------------
%%% Updating handler config
-changing_config(OldConfig=#{id:=Name, config:=HConfig},
+changing_config(OldConfig=#{id:=Name, config:=OldHConfig},
NewConfig=#{id:=Name}) ->
- #{type:=Type, handler_pid:=HPid, mode_tab:=ModeTab} = HConfig,
- MyConfig = maps:get(config, NewConfig, #{}),
- case maps:get(type, MyConfig, Type) of
+ #{type:=Type, handler_pid:=HPid, mode_tab:=ModeTab} = OldHConfig,
+ NewHConfig = maps:get(config, NewConfig, #{}),
+ case maps:get(type, NewHConfig, Type) of
Type ->
- MyConfig1 = MyConfig#{type=>Type,
- handler_pid=>HPid,
- mode_tab=>ModeTab},
+ NewHConfig1 = NewHConfig#{type=>Type,
+ handler_pid=>HPid,
+ mode_tab=>ModeTab},
changing_config1(HPid, OldConfig,
- NewConfig#{config=>MyConfig1});
+ NewConfig#{config=>NewHConfig1});
_ ->
{error,{illegal_config_change,OldConfig,NewConfig}}
end;
@@ -168,38 +168,38 @@ changing_config1(HPid, OldConfig, NewConfig) ->
check_config(adding, Config) ->
%% Merge in defaults on handler level
- MyConfig0 = maps:get(config, Config, #{}),
- MyConfig = maps:merge(#{type => standard_io},
- MyConfig0),
- case check_my_config(maps:to_list(MyConfig)) of
+ HConfig0 = maps:get(config, Config, #{}),
+ HConfig = maps:merge(#{type => standard_io},
+ HConfig0),
+ case check_h_config(maps:to_list(HConfig)) of
ok ->
- {ok,Config#{config=>MyConfig}};
+ {ok,Config#{config=>HConfig}};
Error ->
Error
end;
check_config(changing, Config) ->
- MyConfig = maps:get(config, Config, #{}),
- case check_my_config(maps:to_list(MyConfig)) of
+ HConfig = maps:get(config, Config, #{}),
+ case check_h_config(maps:to_list(HConfig)) of
ok -> {ok,Config};
Error -> Error
end.
-check_my_config([{type,Type} | Config]) when Type == standard_io;
- Type == standard_error ->
- check_my_config(Config);
-check_my_config([{type,{file,File}} | Config]) when is_list(File) ->
- check_my_config(Config);
-check_my_config([{type,{file,File,Modes}} | Config]) when is_list(File),
- is_list(Modes) ->
- check_my_config(Config);
-check_my_config([Other | Config]) ->
+check_h_config([{type,Type} | Config]) when Type == standard_io;
+ Type == standard_error ->
+ check_h_config(Config);
+check_h_config([{type,{file,File}} | Config]) when is_list(File) ->
+ check_h_config(Config);
+check_h_config([{type,{file,File,Modes}} | Config]) when is_list(File),
+ is_list(Modes) ->
+ check_h_config(Config);
+check_h_config([Other | Config]) ->
case logger_h_common:check_common_config(Other) of
valid ->
- check_my_config(Config);
+ check_h_config(Config);
invalid ->
{error,{invalid_config,?MODULE,Other}}
end;
-check_my_config([]) ->
+check_h_config([]) ->
ok.
diff --git a/lib/kernel/test/logger_disk_log_h_SUITE.erl b/lib/kernel/test/logger_disk_log_h_SUITE.erl
index c3b8237f82..5f7b505ecb 100644
--- a/lib/kernel/test/logger_disk_log_h_SUITE.erl
+++ b/lib/kernel/test/logger_disk_log_h_SUITE.erl
@@ -253,10 +253,10 @@ disk_log_opts(Config) ->
default_formatter(Config) ->
PrivDir = ?config(priv_dir,Config),
LogFile = filename:join(PrivDir,atom_to_list(?FUNCTION_NAME)),
- HConfig = #{disk_log_opts => #{file=>LogFile},
- filter_default=>log},
+ HandlerConfig = #{config => #{file=>LogFile},
+ filter_default=>log},
ct:pal("Log: ~p", [LogFile]),
- ok = logger:add_handler(?MODULE, logger_disk_log_h, HConfig),
+ ok = logger:add_handler(?MODULE, logger_disk_log_h, HandlerConfig),
ok = logger:set_handler_config(?MODULE,formatter,
{?DEFAULT_FORMATTER,?DEFAULT_FORMAT_CONFIG}),
LogName = lists:concat([LogFile, ".1"]),
@@ -290,10 +290,10 @@ errors(Config) ->
PrivDir = ?config(priv_dir,Config),
Name1 = list_to_atom(lists:concat([?FUNCTION_NAME,"_1"])),
LogFile1 = filename:join(PrivDir,Name1),
- HConfig = #{disk_log_opts=>#{file=>LogFile1},
- filter_default=>log,
- formatter=>{?MODULE,self()}},
- ok = logger:add_handler(Name1, logger_disk_log_h, HConfig),
+ HandlerConfig = #{config=>#{file=>LogFile1},
+ filter_default=>log,
+ formatter=>{?MODULE,self()}},
+ ok = logger:add_handler(Name1, logger_disk_log_h, HandlerConfig),
{error,{already_exist,Name1}} =
logger:add_handler(Name1, logger_disk_log_h, #{}),
@@ -302,7 +302,7 @@ errors(Config) ->
{error,{illegal_config_change,_,_}} =
logger:set_handler_config(Name1,
- disk_log_opts,
+ config,
#{file=>LogFile1,
type=>halt}),
{error,{illegal_config_change,_,_}} =
@@ -321,11 +321,11 @@ formatter_fail(Config) ->
Name = ?FUNCTION_NAME,
LogFile = filename:join(PrivDir,Name),
ct:pal("Log = ~p", [LogFile]),
- HConfig = #{disk_log_opts => #{file=>LogFile},
- filter_default=>stop,
- filters=>?DEFAULT_HANDLER_FILTERS([?MODULE])},
+ HandlerConfig = #{config => #{file=>LogFile},
+ filter_default=>stop,
+ filters=>?DEFAULT_HANDLER_FILTERS([?MODULE])},
%% no formatter!
- logger:add_handler(Name, logger_disk_log_h, HConfig),
+ logger:add_handler(Name, logger_disk_log_h, HandlerConfig),
Pid = whereis(h_proc_name(Name)),
true = is_pid(Pid),
H = logger:get_handler_ids(),
@@ -387,20 +387,21 @@ config_fail(_Config) ->
formatter=>{?MODULE,self()}}),
%% can't change the disk log options for a log already in use
{error,{illegal_config_change,_,_}} =
- logger:set_handler_config(?MODULE,disk_log_opts,
+ logger:set_handler_config(?MODULE,config,
#{max_no_files=>2}),
%% can't change name of an existing handler
{error,{illegal_config_change,_,_}} =
logger:set_handler_config(?MODULE,id,bad),
- %% incorrect values of OP params
+ %% incorrect values of OP params
+ {ok,#{config := HConfig}} = logger:get_handler_config(?MODULE),
{error,{invalid_levels,_}} =
logger:set_handler_config(?MODULE,config,
- #{sync_mode_qlen=>100,
- flush_qlen=>99}),
+ HConfig#{sync_mode_qlen=>100,
+ flush_qlen=>99}),
%% invalid name of config parameter
{error,{invalid_config,logger_disk_log_h,{filesync_rep_int,2000}}} =
logger:set_handler_config(?MODULE, config,
- #{filesync_rep_int => 2000}),
+ HConfig#{filesync_rep_int => 2000}),
ok.
config_fail(cleanup,_Config) ->
logger:remove_handler(?MODULE).
@@ -445,18 +446,19 @@ reconfig(Config) ->
file := _DiskLogFile}} =
logger_disk_log_h:info(?MODULE),
- ok = logger:set_handler_config(?MODULE, config,
- #{sync_mode_qlen => 1,
- drop_mode_qlen => 2,
- flush_qlen => 3,
- burst_limit_enable => false,
- burst_limit_max_count => 10,
- burst_limit_window_time => 10,
- overload_kill_enable => true,
- overload_kill_qlen => 100000,
- overload_kill_mem_size => 10000000,
- overload_kill_restart_after => never,
- filesync_repeat_interval => no_repeat}),
+ {ok,#{config := HConfig0}} = logger:get_handler_config(?MODULE),
+ HConfig1 = HConfig0#{sync_mode_qlen => 1,
+ drop_mode_qlen => 2,
+ flush_qlen => 3,
+ burst_limit_enable => false,
+ burst_limit_max_count => 10,
+ burst_limit_window_time => 10,
+ overload_kill_enable => true,
+ overload_kill_qlen => 100000,
+ overload_kill_mem_size => 10000000,
+ overload_kill_restart_after => never,
+ filesync_repeat_interval => no_repeat},
+ ok = logger:set_handler_config(?MODULE, config, HConfig1),
#{id := ?MODULE,
sync_mode_qlen := 1,
drop_mode_qlen := 2,
@@ -479,7 +481,7 @@ reconfig(Config) ->
#{filter_default=>log,
filters=>?DEFAULT_HANDLER_FILTERS([?MODULE]),
formatter=>{?MODULE,self()},
- disk_log_opts=>
+ config=>
#{type => halt,
max_no_files => 1,
max_no_bytes => 1024,
@@ -500,7 +502,7 @@ sync(Config) ->
Log = lists:concat([File,".1"]),
ok = logger:add_handler(?MODULE,
logger_disk_log_h,
- #{disk_log_opts => #{file => File},
+ #{config => #{file => File},
filter_default=>log,
filters=>?DEFAULT_HANDLER_FILTERS([?MODULE]),
formatter=>{?MODULE,nl}}),
@@ -529,8 +531,10 @@ sync(Config) ->
%% check that if there's no repeated disk_log_sync active,
%% a disk_log_sync is still performed when handler goes idle
- logger:set_handler_config(?MODULE, config,
- #{filesync_repeat_interval => no_repeat}),
+ {ok,#{config := HConfig}} = logger:get_handler_config(?MODULE),
+ HConfig1 = HConfig#{filesync_repeat_interval => no_repeat},
+ ok = logger:set_handler_config(?MODULE, config, HConfig1),
+
no_repeat = maps:get(filesync_repeat_interval,
logger_disk_log_h:info(?MODULE)),
@@ -556,13 +560,14 @@ sync(Config) ->
start_tracer([{logger_disk_log_h,handle_cast,2}],
[OneSync || _ <- lists:seq(1, 1 + trunc(WaitT/SyncInt))]),
- logger:set_handler_config(?MODULE, config,
- #{filesync_repeat_interval => SyncInt}),
+ HConfig2 = HConfig#{filesync_repeat_interval => SyncInt},
+ ok = logger:set_handler_config(?MODULE, config, HConfig2),
+
SyncInt = maps:get(filesync_repeat_interval,
logger_disk_log_h:info(?MODULE)),
timer:sleep(WaitT),
- logger:set_handler_config(?MODULE, config,
- #{filesync_repeat_interval => no_repeat}),
+ HConfig3 = HConfig#{filesync_repeat_interval => no_repeat},
+ ok = logger:set_handler_config(?MODULE, config, HConfig3),
check_tracer(100),
ok.
sync(cleanup,_Config) ->
@@ -581,7 +586,7 @@ disk_log_wrap(Config) ->
#{filter_default=>log,
filters=>?DEFAULT_HANDLER_FILTERS([?MODULE]),
formatter=>{?MODULE,self()},
- disk_log_opts=>
+ config=>
#{type => wrap,
max_no_files => MaxFiles,
max_no_bytes => MaxBytes,
@@ -637,7 +642,7 @@ disk_log_full(Config) ->
#{filter_default=>log,
filters=>?DEFAULT_HANDLER_FILTERS([?MODULE]),
formatter=>{?MODULE,self()},
- disk_log_opts=>
+ config=>
#{type => halt,
max_no_files => 1,
max_no_bytes => MaxBytes,
@@ -814,7 +819,7 @@ start_h_on_new_node(Config, File) ->
logger_test_lib:setup(
Config,
[{logger,[{handler,default,logger_disk_log_h,
- #{ disk_log_opts => #{ file => File }}}]}]),
+ #{ config => #{ file => File }}}]}]),
ok = rpc:call(Node,logger,set_handler_config,[?STANDARD_HANDLER,formatter,
{?MODULE,nl}]),
Node.
@@ -1217,9 +1222,9 @@ start_handler(Name, FuncName, Config) ->
ct:pal("Logging to ~tp", [File]),
ok = logger:add_handler(Name,
logger_disk_log_h,
- #{disk_log_opts=>#{file => File,
- max_no_files => 1,
- max_no_bytes => 100000000},
+ #{config=>#{file => File,
+ max_no_files => 1,
+ max_no_bytes => 100000000},
filter_default=>log,
filters=>?DEFAULT_HANDLER_FILTERS([Name]),
formatter=>{?MODULE,op}}),
@@ -1325,10 +1330,11 @@ remove(Handler, LogName) ->
ok.
start_and_add(Name, Config, LogOpts) ->
- ct:pal("Adding handler ~w with: ~p",
- [Name,Config#{disk_log_opts=>LogOpts}]),
- ok = logger:add_handler(Name, logger_disk_log_h,
- Config#{disk_log_opts=>LogOpts}),
+ HConfig = maps:get(config, Config, #{}),
+ HConfig1 = maps:merge(HConfig, LogOpts),
+ Config1 = Config#{config=>HConfig1},
+ ct:pal("Adding handler ~w with: ~p", [Name,Config1]),
+ ok = logger:add_handler(Name, logger_disk_log_h, Config1),
Pid = whereis(h_proc_name(Name)),
true = is_pid(Pid),
Name = proplists:get_value(name, disk_log:info(Name)),
diff --git a/lib/kernel/test/logger_env_var_SUITE.erl b/lib/kernel/test/logger_env_var_SUITE.erl
index 4f052b456e..6e182d4bca 100644
--- a/lib/kernel/test/logger_env_var_SUITE.erl
+++ b/lib/kernel/test/logger_env_var_SUITE.erl
@@ -412,7 +412,7 @@ logger_disk_log(Config) ->
= setup(Config,
[{logger,
[{handler,?STANDARD_HANDLER,logger_disk_log_h,
- #{disk_log_opts=>#{file=>Log}}}]}]),
+ #{config=>#{file=>Log}}}]}]),
check_default_log(Node,Log,
disk_log,% dest
0),% progress in std logger
@@ -434,7 +434,7 @@ logger_disk_log_formatter(Config) ->
[{handler,?STANDARD_HANDLER,logger_disk_log_h,
#{filters=>[],
formatter=>{logger_formatter,#{}},
- disk_log_opts=>#{file=>Log}}}]}]),
+ config=>#{file=>Log}}}]}]),
check_single_log(Node,Log,
disk_log,% dest
6),% progress in std logger
diff --git a/lib/kernel/test/logger_simple_h_SUITE.erl b/lib/kernel/test/logger_simple_h_SUITE.erl
index 3a761a257a..e4e48b538a 100644
--- a/lib/kernel/test/logger_simple_h_SUITE.erl
+++ b/lib/kernel/test/logger_simple_h_SUITE.erl
@@ -182,7 +182,7 @@ replace_disk_log(Config) ->
ok = rpc:call(Node, logger, add_handlers,
[[{handler, default, logger_disk_log_h,
- #{ disk_log_opts => #{ file => File },
+ #{ config => #{ file => File },
formatter => {?DEFAULT_FORMATTER,?DEFAULT_FORMAT_CONFIG}}}]]),
{ok,Bin} = sync_and_read(Node, disk_log, File),
Lines = [unicode:characters_to_list(L) ||
diff --git a/lib/kernel/test/logger_std_h_SUITE.erl b/lib/kernel/test/logger_std_h_SUITE.erl
index 2efe2ce6f6..36b123b07d 100644
--- a/lib/kernel/test/logger_std_h_SUITE.erl
+++ b/lib/kernel/test/logger_std_h_SUITE.erl
@@ -336,7 +336,7 @@ crash_std_h_to_disk_log(Config) ->
Log = filename:join(Dir,lists:concat([?MODULE,"_",?FUNCTION_NAME,".log"])),
crash_std_h(Config,?FUNCTION_NAME,
[{handler,default,logger_disk_log_h,
- #{ disk_log_opts => #{ file => Log }}}],
+ #{ config => #{ file => Log }}}],
disk_log,Log).
crash_std_h_to_disk_log(cleanup,_Config) ->
crash_std_h(cleanup).