From 66869e2d637bc51b4382f820f682f0453ce29dec Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Thu, 17 Dec 2015 15:05:39 -0600 Subject: [PATCH] Start traces after extra sinks are started Previously, if you configured a trace to use an extra sink, you'd get a noproc error. Addresses issue #296 on github. --- src/lager_app.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lager_app.erl b/src/lager_app.erl index 73ee071..ebbf330 100644 --- a/src/lager_app.erl +++ b/src/lager_app.erl @@ -208,7 +208,6 @@ start(_StartType, _StartArgs) -> start_handlers(?DEFAULT_SINK, get_env(lager, handlers, ?DEFAULT_HANDLER_CONF)), - ok = add_configured_traces(), lager:update_loglevel_config(?DEFAULT_SINK), @@ -223,6 +222,8 @@ start(_StartType, _StartArgs) -> %% Now handle extra sinks configure_extra_sinks(get_env(lager, extra_sinks, [])), + ok = add_configured_traces(), + clean_up_config_checks(), {ok, Pid, SavedHandlers}.