Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #552 from thobbs/fix-ssl-logging

Fix erroneous logging about SSL, move details to debug level
  • Loading branch information...
commit 3c6d005e1d378bdfc347fa9bccf88aad04f9340a 2 parents 0ef3b1f + 5838dd4
@zznate zznate authored
View
25 core/src/main/java/me/prettyprint/cassandra/connection/factory/HThriftClientFactoryImpl.java
@@ -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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.