Browse Source

Hide cacerts from the listen error log

It can be quite huge and hinders readability.
Loïc Hoguin 7 years ago
parent
commit
a230411488
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/ranch_acceptors_sup.erl

+ 2 - 1
src/ranch_acceptors_sup.erl

@@ -58,7 +58,8 @@ init([Ref, Transport]) ->
 -spec listen_error(any(), module(), any(), atom(), module()) -> no_return().
 listen_error(Ref, Transport, SocketOpts0, Reason, Logger) ->
 	SocketOpts1 = [{cert, '...'}|proplists:delete(cert, SocketOpts0)],
-	SocketOpts = [{key, '...'}|proplists:delete(key, SocketOpts1)],
+	SocketOpts2 = [{key, '...'}|proplists:delete(key, SocketOpts1)],
+	SocketOpts = [{cacerts, '...'}|proplists:delete(cacerts, SocketOpts2)],
 	ranch:log(error,
 		"Failed to start Ranch listener ~p in ~p:listen(~999999p) for reason ~p (~s)~n",
 		[Ref, Transport, SocketOpts, Reason, format_error(Reason)], Logger),