Sfoglia il codice sorgente

Fix the Fix for the Fix for #49, thanks to Kostis for keeping me honest

pull/51/head
Andrew Thompson 13 anni fa
parent
commit
7815a88c55
1 ha cambiato i file con 4 aggiunte e 5 eliminazioni
  1. +4
    -5
      src/lager.erl

+ 4
- 5
src/lager.erl Vedi File

@ -128,14 +128,13 @@ trace_file(File, Filter, Level) ->
Res = case lists:member({lager_file_backend, File}, Handlers) of
false ->
%% install the handler
{ok, _} = supervisor:start_child(lager_handler_watcher_sup,
[lager_event, {lager_file_backend, File}, {File, none}]),
ok;
supervisor:start_child(lager_handler_watcher_sup,
[lager_event, {lager_file_backend, File}, {File, none}]);
_ ->
ok
{ok, exists}
end,
case Res of
ok ->
{ok, _} ->
%% install the trace.
{MinLevel, Traces} = lager_mochiglobal:get(loglevel),
case lists:member(Trace, Traces) of

Caricamento…
Annulla
Salva