From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete. 

---
 opends/src/server/org/opends/server/tools/SSLConnectionFactory.java |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java b/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
index ebdf6eb..01a466f 100644
--- a/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
+++ b/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
@@ -45,8 +45,9 @@
 
 import static org.opends.server.messages.ToolMessages.*;
 import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
 
 
 /**
@@ -54,8 +55,6 @@
  */
 public class SSLConnectionFactory
 {
-  private static final String CLASS_NAME =
-       "org.opends.server.tools.SSLConnectionFactory";
 
   private SSLSocketFactory sslSocketFactory = null;
 
@@ -246,7 +245,10 @@
 
     } catch(Exception e)
     {
-      assert debugException(CLASS_NAME, "getKeyManagers", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
       int msgID = MSGID_TOOLS_CANNOT_LOAD_KEYSTORE_FILE;
       throw new SSLConnectionException(getMessage(msgID, keyStoreFile), e);
     }
@@ -261,7 +263,10 @@
       return keyManagerFactory.getKeyManagers();
     } catch(Exception ke)
     {
-      assert debugException(CLASS_NAME, "getKeyManagers", ke);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ke);
+      }
       int msgID = MSGID_TOOLS_CANNOT_INIT_KEYMANAGER;
       throw new SSLConnectionException(getMessage(msgID, keyStoreFile), ke);
     }
@@ -332,7 +337,10 @@
       inputStream.close();
     } catch(Exception e)
     {
-      assert debugException(CLASS_NAME, "getTrustManagers", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
       int msgID = MSGID_TOOLS_CANNOT_LOAD_TRUSTSTORE_FILE;
       throw new SSLConnectionException(getMessage(msgID, trustStoreFile), e);
     }
@@ -347,7 +355,10 @@
       return trustManagerFactory.getTrustManagers();
     } catch(Exception ke)
     {
-      assert debugException(CLASS_NAME, "getTrustManagers", ke);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ke);
+      }
       int msgID = MSGID_TOOLS_CANNOT_INIT_TRUSTMANAGER;
       throw new SSLConnectionException(getMessage(msgID, trustStoreFile), ke);
     }

--
Gitblit v1.10.0