Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix erroneous logging about SSL, move details to debug level #552

Merged
merged 1 commit into from

2 participants

Tyler Hobbs Nate McCall
Tyler Hobbs

Regardless of whether SSL was enabled or not, it was being logged that it was enabled. Additionally, most of the details should be at the debug level instead of info.

Nate McCall
Collaborator

Good catch - thanks!

Nate McCall zznate merged commit 3c6d005 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
25 core/src/main/java/me/prettyprint/cassandra/connection/factory/HThriftClientFactoryImpl.java
View
@@ -17,7 +17,7 @@
*
*/
public class HThriftClientFactoryImpl implements HClientFactory {
-
+
private static final Logger log = LoggerFactory.getLogger(HThriftClientFactoryImpl.class);
private TSSLTransportParameters params;
@@ -26,18 +26,19 @@
*/
public HClient createClient(CassandraHost ch) {
params = SSLHelper.getTSSLTransportParameters();
-
- log.info("SSL enabled for client<->server communications.");
- log.info("Properties:");
- log.info(" ssl.truststore = {}", System.getProperty("ssl.truststore"));
- log.info(" ssl.protocol = {}", System.getProperty("ssl.protocol"));
- log.info(" ssl.store.type = {}", System.getProperty("ssl.store.type"));
- log.info(" ssl.cipher.suites = {}", System.getProperty("ssl.cipher.suites"));
-
- if ( log.isDebugEnabled() ) {
- log.debug("Creation of new client for host: " + ch.getIp());
+
+ if ( params != null ) {
+ log.info("SSL enabled for client<->server communications.");
+ if ( log.isDebugEnabled() ) {
+ log.debug("Properties:");
+ log.debug(" ssl.truststore = {}", System.getProperty("ssl.truststore"));
+ log.debug(" ssl.protocol = {}", System.getProperty("ssl.protocol"));
+ log.debug(" ssl.store.type = {}", System.getProperty("ssl.store.type"));
+ log.debug(" ssl.cipher.suites = {}", System.getProperty("ssl.cipher.suites"));
+ log.debug("Creation of new client for host: " + ch.getIp());
+ }
}
-
+
return params == null ? new HThriftClient(ch) : new HThriftClient(ch, params);
}
Something went wrong with that request. Please try again.