geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bogle...@apache.org
Subject incubator-geode git commit: GEODE-1225: Set base log level DEBUG in JSSESocketJUnitTest
Date Thu, 14 Apr 2016 22:01:50 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop d50f16ffd -> ce889fecf


GEODE-1225: Set base log level DEBUG in  JSSESocketJUnitTest


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ce889fec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ce889fec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ce889fec

Branch: refs/heads/develop
Commit: ce889fecf8409edc5fb1306500737f94509176b0
Parents: d50f16f
Author: Barry Oglesby <boglesby@pivotal.io>
Authored: Thu Apr 14 13:57:09 2016 -0700
Committer: Barry Oglesby <boglesby@pivotal.io>
Committed: Thu Apr 14 14:56:55 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/JSSESocketJUnitTest.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce889fec/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
index c8927b6..63febc0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
@@ -97,6 +97,11 @@ public class JSSESocketJUnitTest {
     
     TestAppender.create();
     
+    // Get original base log level
+    Level originalBaseLevel = LogService.getBaseLogLevel();
+    try {
+    // Set base log level to debug to log the SSL messages
+    LogService.setBaseLogLevel(Level.DEBUG);
     {
       System.setProperty( "gemfire.mcast-port", "0");
       System.setProperty( "gemfire.ssl-enabled", "true" );
@@ -146,6 +151,10 @@ public class JSSESocketJUnitTest {
     if ( peerLogCount != 2 ) {
       throw new Exception( "Expected to find to peer identities logged." );
     }
+    } finally {
+      // Reset original base log level
+      LogService.setBaseLogLevel(originalBaseLevel);
+    }
   }
   
   /** not actually related to this test class, but this is as good a place
@@ -230,7 +239,7 @@ public class JSSESocketJUnitTest {
       Appender appender = new TestAppender();
       Logger socketCreatorLogger = (Logger) LogManager.getLogger(SOCKET_CREATOR_CLASSNAME);
       LoggerConfig config = socketCreatorLogger.getContext().getConfiguration().getLoggerConfig(SOCKET_CREATOR_CLASSNAME);
-      config.addAppender(appender, Level.INFO, null);
+      config.addAppender(appender, Level.DEBUG, null);
       return appender;
     }
 


Mime
View raw message