This commit is contained in:
Feng Lee 2015-09-16 21:52:18 +08:00
parent c581c59908
commit 12b4bc9697
1 changed files with 2 additions and 2 deletions

View File

@ -89,9 +89,9 @@ init([]) ->
handle_call({start_trace, Who, LogFile}, _From, State = #state{level = Level, trace_map = TraceMap}) ->
case lager:trace_file(LogFile, [Who], Level, ?TRACE_OPTIONS) of
{ok, exists} ->
{ok, exists} ->
{reply, {error, existed}, State};
{ok, Trace} ->
{ok, Trace} ->
{reply, ok, State#state{trace_map = maps:put(Who, {Trace, LogFile}, TraceMap)}};
{error, Error} ->
{reply, {error, Error}, State}