Skip to content

Loading…

Install file backend if not already installed in trace/3 #163

Closed
wants to merge 1 commit into from

1 participant

@srijan

trace_file/3 already does this. So, call it from trace/3 in case of file
backend.

Fixes #158

@srijan srijan Install file backend if not already installed in trace/3
trace_file/3 already does this. So, call it from trace/3 in case of file
backend.
0fdc37d
@Vagabond Vagabond closed this in 95f5a13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 7, 2013
  1. @srijan

    Install file backend if not already installed in trace/3

    srijan committed
    trace_file/3 already does this. So, call it from trace/3 in case of file
    backend.
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/lager.erl
View
3 src/lager.erl
@@ -178,6 +178,9 @@ trace_console(Filter, Level) ->
trace(Backend, Filter) ->
trace(Backend, Filter, debug).
+trace({lager_file_backend, File}, Filter, Level) ->
+ trace_file(File, Filter, Level);
+
trace(Backend, Filter, Level) ->
Trace0 = {Filter, Level, Backend},
case lager_util:validate_trace(Trace0) of
Something went wrong with that request. Please try again.