Revert logger print to io:format

This commit is contained in:
terry-xiaoyu 2018-11-10 11:01:11 +08:00
parent cca27d1a5a
commit 2611b6fc2a
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ start() ->
start_listener({Proto, ListenOn, Options}) -> start_listener({Proto, ListenOn, Options}) ->
case start_listener(Proto, ListenOn, Options) of case start_listener(Proto, ListenOn, Options) of
{ok, _} -> {ok, _} ->
logger:info("Start mqtt:~s listener on ~s successfully.", [Proto, format(ListenOn)]); io:format("Start mqtt:~s listener on ~s successfully.~n", [Proto, format(ListenOn)]);
{error, Reason} -> {error, Reason} ->
io:format(standard_error, "Failed to start mqtt:~s listener on ~s - ~p~n!", io:format(standard_error, "Failed to start mqtt:~s listener on ~s - ~p~n!",
[Proto, format(ListenOn), Reason]) [Proto, format(ListenOn), Reason])
@ -117,7 +117,7 @@ stop() ->
stop_listener({Proto, ListenOn, Opts}) -> stop_listener({Proto, ListenOn, Opts}) ->
case stop_listener(Proto, ListenOn, Opts) of case stop_listener(Proto, ListenOn, Opts) of
ok -> ok ->
logger:info("Stop mqtt:~s listener on ~s successfully.", [Proto, format(ListenOn)]); io:format("Stop mqtt:~s listener on ~s successfully.~n", [Proto, format(ListenOn)]);
{error, Reason} -> {error, Reason} ->
io:format(standard_error, "Failed to stop mqtt:~s listener on ~s - ~p~n.", io:format(standard_error, "Failed to stop mqtt:~s listener on ~s - ~p~n.",
[Proto, format(ListenOn), Reason]) [Proto, format(ListenOn), Reason])