Skip to content

Commit

Permalink
Make logging on error only when tracing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeiklejohn committed Oct 7, 2018
1 parent dcf5d89 commit 0691aa6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/partisan_peer_service_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ init([Peer, ListenAddr, Channel, From]) ->

{ok, #state{from=From, listen_addr=ListenAddr, channel=Channel, socket=Socket, peer=Peer}};
Error ->
lager:warning("Pid ~p is unable to connect to ~p due to ~p", [self(), Peer, Error]),
case partisan_config:get(tracing, ?TRACING) of
true ->
lager:warning("Pid ~p is unable to connect to ~p due to ~p", [self(), Peer, Error]);
false ->
ok
end,
{stop, normal}
end.

Expand Down

0 comments on commit 0691aa6

Please sign in to comment.