chore(gw): pretty print exproto logs

This commit is contained in:
JianBo He 2022-05-12 15:34:02 +08:00
parent 18d265cecd
commit ebe8b3fd20
1 changed files with 5 additions and 4 deletions

View File

@ -167,16 +167,17 @@ start_grpc_server(GwName, Options = #{bind := ListenOn}) ->
)} )}
] ]
end, end,
ListenOnStr = emqx_listeners:format_addr(ListenOn),
case grpc:start_server(GwName, ListenOn, Services, SvrOptions) of case grpc:start_server(GwName, ListenOn, Services, SvrOptions) of
{ok, _SvrPid} -> {ok, _SvrPid} ->
console_print( console_print(
"Start ~ts gRPC server on ~p successfully.~n", "Start ~ts gRPC server on ~s successfully.~n",
[GwName, ListenOn] [GwName, ListenOnStr]
); );
{error, Reason} -> {error, Reason} ->
?ELOG( ?ELOG(
"Failed to start ~ts gRPC server on ~p, reason: ~0p", "Failed to start ~ts gRPC server on ~s, reason: ~0p",
[GwName, ListenOn, Reason] [GwName, ListenOnStr, Reason]
), ),
throw( throw(
{badconf, #{ {badconf, #{