Skip to content
Snippets Groups Projects
Commit 5905db65 authored by Morris Estepa's avatar Morris Estepa
Browse files

Replace printStackTrace() with logging

parent e4648df3
No related branches found
No related tags found
2 merge requests!346Merge branch 'aws-integration' into 'master',!312Replace printStackTrace() with logging
...@@ -71,11 +71,9 @@ public class ElasticClientHandlerAws extends ElasticClientHandler { ...@@ -71,11 +71,9 @@ public class ElasticClientHandlerAws extends ElasticClientHandler {
httpClientBuilder.setSSLContext(sslContext) httpClientBuilder.setSSLContext(sslContext)
.setSSLHostnameVerifier((s, session) -> true)); .setSSLHostnameVerifier((s, session) -> true));
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block log.severe(e.getMessage());
e.printStackTrace();
} catch (KeyManagementException e) { } catch (KeyManagementException e) {
// TODO Auto-generated catch block log.severe(e.getMessage());
e.printStackTrace();
} }
} }
......
...@@ -21,12 +21,14 @@ import java.util.Base64; ...@@ -21,12 +21,14 @@ import java.util.Base64;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManager;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.message.BasicHeader; import org.apache.http.message.BasicHeader;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
@Slf4j
public class ElasticUtilsAws extends ElasticUtils { public class ElasticUtilsAws extends ElasticUtils {
private static final int REST_CLIENT_CONNECT_TIMEOUT = 60000; private static final int REST_CLIENT_CONNECT_TIMEOUT = 60000;
...@@ -50,11 +52,9 @@ public class ElasticUtilsAws extends ElasticUtils { ...@@ -50,11 +52,9 @@ public class ElasticUtilsAws extends ElasticUtils {
httpClientBuilder.setSSLContext(sslContext) httpClientBuilder.setSSLContext(sslContext)
.setSSLHostnameVerifier((s, session) -> true)); .setSSLHostnameVerifier((s, session) -> true));
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block log.error("No such algorithm.", e);
e.printStackTrace();
} catch (KeyManagementException e) { } catch (KeyManagementException e) {
// TODO Auto-generated catch block log.error("Key management error.", e);
e.printStackTrace();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment