Rename 'already_existed' to 'already_exists'
This commit is contained in:
parent
eb53d366e9
commit
96122cf966
|
@ -154,7 +154,7 @@ init([]) ->
|
||||||
handle_call({register_mod, Type, Mod, Opts, Seq}, _From, State) ->
|
handle_call({register_mod, Type, Mod, Opts, Seq}, _From, State) ->
|
||||||
Mods = lookup_mods(Type),
|
Mods = lookup_mods(Type),
|
||||||
reply(case lists:keymember(Mod, 1, Mods) of
|
reply(case lists:keymember(Mod, 1, Mods) of
|
||||||
true -> {error, already_existed};
|
true -> {error, already_exists};
|
||||||
false ->
|
false ->
|
||||||
case catch Mod:init(Opts) of
|
case catch Mod:init(Opts) of
|
||||||
{ok, ModState} ->
|
{ok, ModState} ->
|
||||||
|
|
|
@ -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} ->
|
||||||
|
|
Loading…
Reference in New Issue