diff options
author | Siri Hansen <[email protected]> | 2018-05-14 20:27:55 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-05-21 17:43:53 +0200 |
commit | 5d49f8a25005945b7260facc1a985c294746616b (patch) | |
tree | 34b529189098cbf29a3e76be797d46ea67eb377d /lib/kernel/src/logger_server.erl | |
parent | d29fca17a0c053fca2e5961fb146e9aeefb55aa9 (diff) | |
download | otp-5d49f8a25005945b7260facc1a985c294746616b.tar.gz otp-5d49f8a25005945b7260facc1a985c294746616b.tar.bz2 otp-5d49f8a25005945b7260facc1a985c294746616b.zip |
Add update_logger_config/1 and update_handler_config/2 to logger
Diffstat (limited to 'lib/kernel/src/logger_server.erl')
-rw-r--r-- | lib/kernel/src/logger_server.erl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/kernel/src/logger_server.erl b/lib/kernel/src/logger_server.erl index bd0c325f2b..275b9c476f 100644 --- a/lib/kernel/src/logger_server.erl +++ b/lib/kernel/src/logger_server.erl @@ -27,7 +27,7 @@ add_filter/2, remove_filter/2, set_module_level/2, reset_module_level/1, cache_module_level/1, - set_config/2, set_config/3]). + set_config/2, set_config/3, update_config/2]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, @@ -92,10 +92,7 @@ cache_module_level(Module) -> set_config(Owner,Key,Value) -> - case sanity_check(Owner,Key,Value) of - ok -> call({update_config,Owner,#{Key=>Value}}); - Error -> Error - end. + update_config(Owner,#{Key=>Value}). set_config(Owner,Config0) -> case sanity_check(Owner,Config0) of @@ -106,6 +103,14 @@ set_config(Owner,Config0) -> Error end. +update_config(Owner, Config) -> + case sanity_check(Owner,Config) of + ok -> + call({update_config,Owner,Config}); + Error -> + Error + end. + %%%=================================================================== %%% gen_server callbacks %%%=================================================================== |