ZOOKEEPER-2856: ZooKeeperSaslClient#respondToServer should log exception
See https://issues.apache.org/jira/browse/ZOOKEEPER-2856 for details.
When upstream like HBase call ZooKeeperSaslClient with security enabled, we sometimes get error in HBase logs like:
`SASL authentication failed using login context 'Client'.`
This error occures when getting SaslException in ZooKeeperSaslClient#respondToServer :
`catch (SaslException e) {`
`LOG.error("SASL authentication failed using login context '" +`
` this.getLoginContext() + "'.");`
`saslState = SaslState.FAILED;`
`gotLastPacket = true;`
` }`
This error makes user confused without explicit exception message. So I think we can add exception message to the log.
The patch uses parameterized logging to add the exception message to the log.
Author: panyuxuan <panyuxuan@cmss.chinamobile.com>
Reviewers: Michael Han <hanm@apache.org>
Closes #318 from pyx1990/ZOOKEEPER-2856