Skip to content

Commit

Permalink
Fix trace_file to return the new trace return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagabond committed Jan 22, 2015
1 parent c2b75f0 commit b0a5d08
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ trace_file(File, Filter, Level) when is_atom(Level) ->

trace_file(File, Filter, Options) when is_list(Options) ->
trace_file(File, Filter, debug, Options).

trace_file(File, Filter, Level, Options) ->
Trace0 = {Filter, Level, {lager_file_backend, File}},
case lager_util:validate_trace(Trace0) of
Expand All @@ -167,15 +167,14 @@ trace_file(File, Filter, Level, Options) ->
case Res of
{ok, _} ->
add_trace_to_loglevel_config(Trace),
{ok, Trace};
{ok, {{lager_file_backend, File}, Filter, Level}};
{error, _} = E ->
E
end;
Error ->
Error
end.


trace_console(Filter) ->
trace_console(Filter, debug).

Expand Down

0 comments on commit b0a5d08

Please sign in to comment.