Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

File backends started as part of a trace have a loglevel of 'none'

  • Loading branch information...
commit 351e482735ad48016657d068b6cabdde92f41704 1 parent c809630
@Vagabond Vagabond authored
Showing with 3 additions and 1 deletion.
  1. +1 −1  src/lager.erl
  2. +2 −0  src/lager_file_backend.erl
View
2  src/lager.erl
@@ -115,7 +115,7 @@ trace_file(File, Filter, Level) ->
false ->
%% install the handler
supervisor:start_child(lager_handler_watcher_sup,
- [lager_event, {lager_file_backend, File}, {File, Level}]);
+ [lager_event, {lager_file_backend, File}, {File, none}]);
_ ->
{ok, exists}
end,
View
2  src/lager_file_backend.erl
@@ -412,6 +412,8 @@ filesystem_test_() ->
file:delete("foo.log"),
{ok, _} = lager:trace_file("foo.log", [{module, ?MODULE}]),
lager:error("Test message"),
+ %% not elegible for trace
+ lager:log(error, self(), "Test message"),
{ok, Bin3} = file:read_file("foo.log"),
?assertMatch([_, _, "[error]", _, "Test message\n"], re:split(Bin3, " ", [{return, list}, {parts, 5}]))
end
Please sign in to comment.
Something went wrong with that request. Please try again.