diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-01-13 18:43:32 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-01-13 18:48:20 +0100 |
| commit | decd38634bc993ee5325ec4d9683c01c7e114f82 (patch) | |
| tree | 1fb203a69cafe855cfd5e1e7c4f61378a29fc90a /src | |
| parent | 672ce60348b6d766a8f071f5573a3385bc7dfa61 (diff) | |
| download | rabbitmq-server-git-decd38634bc993ee5325ec4d9683c01c7e114f82.tar.gz | |
rabbit_prelaunch_early_logging: Setup all categories early
... instead of `prelaunch` category only. This allows to see the
messages logged to the new `feature_flags` category as they are logged
before the final configuration of logging (because logging requires
configuration which requires feature flags).
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_lager.erl | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/rabbit_lager.erl b/src/rabbit_lager.erl index 0af348d162..e9dce91909 100644 --- a/src/rabbit_lager.erl +++ b/src/rabbit_lager.erl @@ -664,27 +664,7 @@ maybe_configure_handler_backends([{Backend, _}|Backends]) -> maybe_configure_handler_backends(Backends). list_expected_sinks() -> - case application:get_env(rabbit, lager_extra_sinks) of - {ok, List} -> - List; - undefined -> - CompileOptions = proplists:get_value(options, - ?MODULE:module_info(compile), - []), - AutoList = [lager_util:make_internal_sink_name(M) - || M <- proplists:get_value(lager_extra_sinks, - CompileOptions, [])], - List = case lists:member(?LAGER_SINK, AutoList) of - true -> AutoList; - false -> [?LAGER_SINK | AutoList] - end, - %% Store the list in the application environment. If this - %% module is later cover-compiled, the compile option will - %% be lost, so we will be able to retrieve the list from the - %% application environment. - ok = application:set_env(rabbit, lager_extra_sinks, List), - List - end. + rabbit_prelaunch_early_logging:list_expected_sinks(). maybe_remove_logger_handler() -> M = logger, |
