|
@@ -78,7 +78,7 @@ init([]) ->
|
|
|
handle_call({start_trace, Who, LogFile}, _From, State = #state{level = Level, traces = Traces}) ->
|
|
handle_call({start_trace, Who, LogFile}, _From, State = #state{level = Level, traces = Traces}) ->
|
|
|
case catch lager:trace_file(LogFile, [Who], Level, ?OPTIONS) of
|
|
case catch lager:trace_file(LogFile, [Who], Level, ?OPTIONS) of
|
|
|
{ok, exists} ->
|
|
{ok, exists} ->
|
|
|
- {reply, {error, already_existed}, State};
|
|
|
|
|
|
|
+ {reply, {error, already_exists}, State};
|
|
|
{ok, Trace} ->
|
|
{ok, Trace} ->
|
|
|
{reply, ok, State#state{traces = maps:put(Who, {Trace, LogFile}, Traces)}};
|
|
{reply, ok, State#state{traces = maps:put(Who, {Trace, LogFile}, Traces)}};
|
|
|
{error, Reason} ->
|
|
{error, Reason} ->
|