From ddede7ae6fbbadbe08861bc85a664b73d66f77c7 Mon Sep 17 00:00:00 2001 From: Denes Gerencser Date: Sat, 9 Mar 2019 18:45:17 +0000 Subject: [PATCH] HADOOP-16174. Disable wildfly logs to the console. Follow-on to HADOOP-15851. Author: Denes Gerencser --- .../apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java index 6d3e4ea878..01dca4c953 100644 --- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java +++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java @@ -120,9 +120,12 @@ private void initializeSSLContext(SSLChannelMode preferredChannelMode) switch (preferredChannelMode) { case Default: try { - java.util.logging.Logger.getLogger(SSL.class.getName()).setLevel(Level.WARNING); + java.util.logging.Logger logger = java.util.logging.Logger.getLogger(SSL.class.getName()); + logger.setLevel(Level.WARNING); ctx = SSLContext.getInstance("openssl.TLS"); ctx.init(null, null, null); + // Strong reference needs to be kept to logger until initialization of SSLContext finished (see HADOOP-16174): + logger.setLevel(Level.INFO); channelMode = SSLChannelMode.OpenSSL; } catch (NoSuchAlgorithmException e) { LOG.warn("Failed to load OpenSSL. Falling back to the JSSE default.");