improve logging in leader election lookForLeader method when address resolution 

                 Key: ZOOKEEPER-337
             Project: Zookeeper
          Issue Type: Improvement
          Components: quorum
            Reporter: Patrick Hunt
             Fix For: 3.2.0

leader election has the following code:

      "Server address: " + server.addr);

this should be switched to have the info log first, set sock addr second.

The reason for this is that if the setSocketAddress fails sun is not printing 
the address used. As a result it's verfy difficult to debug this issue.

If we log the server address first, then if the setsockaddr fails we'll see 
both the address of the server and the exception detail (right now we just see 
the exception detail which does not include the invlaid address in 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to