aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/logger.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-05-14 20:27:55 +0200
committerLukas Larsson <[email protected]>2018-05-21 17:43:53 +0200
commit5d49f8a25005945b7260facc1a985c294746616b (patch)
tree34b529189098cbf29a3e76be797d46ea67eb377d /lib/kernel/src/logger.erl
parentd29fca17a0c053fca2e5961fb146e9aeefb55aa9 (diff)
downloadotp-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.erl')
-rw-r--r--lib/kernel/src/logger.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/kernel/src/logger.erl b/lib/kernel/src/logger.erl
index 2c7466fdf6..a839f97e62 100644
--- a/lib/kernel/src/logger.erl
+++ b/lib/kernel/src/logger.erl
@@ -40,6 +40,7 @@
set_module_level/2, reset_module_level/1,
set_logger_config/1, set_logger_config/2,
set_handler_config/2, set_handler_config/3,
+ update_logger_config/1, update_handler_config/2,
get_logger_config/0, get_handler_config/1,
add_handlers/1]).
@@ -361,6 +362,17 @@ set_handler_config(HandlerId,Key,Value) ->
set_handler_config(HandlerId,Config) ->
logger_server:set_config(HandlerId,Config).
+-spec update_logger_config(Config) -> ok | {error,term()} when
+ Config :: config().
+update_logger_config(Config) ->
+ logger_server:update_config(logger,Config).
+
+-spec update_handler_config(HandlerId,Config) -> ok | {error,term()} when
+ HandlerId :: handler_id(),
+ Config :: config().
+update_handler_config(HandlerId,Config) ->
+ logger_server:update_config(HandlerId,Config).
+
-spec get_logger_config() -> {ok,Config} when
Config :: config().
get_logger_config() ->