瀏覽代碼

Mixed up application:get_env with proplists behavior

pull/264/head
John R. Daily 10 年之前
父節點
當前提交
3ae2ca020c
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      src/lager_app.erl

+ 3
- 3
src/lager_app.erl 查看文件

@ -70,11 +70,11 @@ determine_async_behavior(Sink, {ok, Threshold}, {ok, Window}) ->
start_handlers(_Sink, undefined) ->
ok;
start_handlers(_Sink, {ok, Handlers}) when not is_list(Handlers) ->
start_handlers(_Sink, Handlers) when not is_list(Handlers) ->
error_logger:error_msg(
"Invalid value for 'handlers' (must be list): ~p~n", [Handlers]),
throw({error, bad_config});
start_handlers(Sink, {ok, Handlers}) ->
start_handlers(Sink, Handlers) ->
%% handlers failing to start are handled in the handler_watcher
lager_config:global_set(handlers,
lager_config:global_get(handlers, []) ++
@ -151,7 +151,7 @@ start(_StartType, _StartArgs) ->
application:get_env(lager, async_threshold),
application:get_env(lager, async_threshold_window)),
start_handlers(?DEFAULT_SINK,
application:get_env(lager, handlers, {ok, ?DEFAULT_HANDLER_CONF})),
application:get_env(lager, handlers, ?DEFAULT_HANDLER_CONF)),
ok = add_configured_traces(),

Loading…
取消
儲存