소스 검색

HADOOP-16174. Disable wildfly logs to the console.

Follow-on to HADOOP-15851.

Author:    Denes Gerencser <dgerencser@cloudera.com>
Denes Gerencser 6 년 전
부모
커밋
ddede7ae6f
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java

+ 4 - 1
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/SSLSocketFactoryEx.java

@@ -120,9 +120,12 @@ public final class SSLSocketFactoryEx extends SSLSocketFactory {
     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.");