diff options
author | Siri Hansen <[email protected]> | 2019-01-21 14:26:07 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2019-01-21 14:26:07 +0100 |
commit | a8364425a7190b65cd33e58ac3c155a77c462b74 (patch) | |
tree | c659252e6397483d1f1771485cfee80b198a3fbb /lib/kernel/src/logger_config.erl | |
parent | a5682ac818347a5091ba7dbc88928e8a634f15ec (diff) | |
parent | f7123f64f6fa1727b49648e4335720910d8f10bf (diff) | |
download | otp-a8364425a7190b65cd33e58ac3c155a77c462b74.tar.gz otp-a8364425a7190b65cd33e58ac3c155a77c462b74.tar.bz2 otp-a8364425a7190b65cd33e58ac3c155a77c462b74.zip |
Merge branch 'siri/logger/erts-and-remote-log-olp' into maint
* siri/logger/erts-and-remote-log-olp:
[logger] Update bench marks to report percent instead of 0.XX
[logger] Minor fix in logger_olp_SUITE to avoid error in end_per_testcase
[logger] Remove info and reset functions from handler modules
[logger] Remove some unused variable warnings
[logger] Store proxy config in logger ets table
[logger] Log mode change and flushes in logger_proxy
[logger] Move out overload protection macros from logger_h_common.hrl
[logger] Allow logger_olp callbacks to return {stop,...}
Add logger_stress_SUITE to benchmarks spec
[logger] Add idle timer in logger_olp
[logger] Use persistent_term for storing proxy reference
Update preloaded
Use system_time instead of monotonic_time in log events
[logger] Add test for restart of logger proxy
[logger] Add API function for configuring logger proxy
[logger] Add logger_stress_SUITE
[logger] Add tests for logger_proxy
[logger] Overload protect logging from erts and remote nodes
[logger] Split overload protection functionality to own module
Diffstat (limited to 'lib/kernel/src/logger_config.erl')
-rw-r--r-- | lib/kernel/src/logger_config.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/kernel/src/logger_config.erl b/lib/kernel/src/logger_config.erl index 5e9faf332c..5024d20cfe 100644 --- a/lib/kernel/src/logger_config.erl +++ b/lib/kernel/src/logger_config.erl @@ -66,6 +66,8 @@ get(Tid,What) -> case ets:lookup(Tid,table_key(What)) of [{_,_,Config}] -> {ok,Config}; + [{_,Config}] when What=:=proxy -> + {ok,Config}; [] -> {error,{not_found,What}} end. @@ -79,10 +81,15 @@ get(Tid,What,Level) -> [Data] -> {ok,Data} end. +create(Tid,proxy,Config) -> + ets:insert(Tid,{table_key(proxy),Config}); create(Tid,What,Config) -> LevelInt = level_to_int(maps:get(level,Config)), ets:insert(Tid,{table_key(What),LevelInt,Config}). +set(Tid,proxy,Config) -> + ets:insert(Tid,{table_key(proxy),Config}), + ok; set(Tid,What,Config) -> LevelInt = level_to_int(maps:get(level,Config)), %% Should do this only if the level has actually changed. Possibly @@ -148,5 +155,6 @@ int_to_level(?LOG_ALL) -> all. %%%----------------------------------------------------------------- %%% Internal +table_key(proxy) -> ?PROXY_KEY; table_key(primary) -> ?PRIMARY_KEY; table_key(HandlerId) -> {?HANDLER_KEY,HandlerId}. |