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/backends/jeb/DN2URI.java |   41 ++++++++++++++++++++++++++++-------------
 1 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/DN2URI.java b/opends/src/server/org/opends/server/backends/jeb/DN2URI.java
index d349e1e..b7caaa2 100644
--- a/opends/src/server/org/opends/server/backends/jeb/DN2URI.java
+++ b/opends/src/server/org/opends/server/backends/jeb/DN2URI.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2006 Sun Microsystems, Inc.
+ *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
  */
 package org.opends.server.backends.jeb;
 
@@ -61,7 +61,9 @@
 import java.util.Set;
 
 import static org.opends.server.util.ServerConstants.ATTR_REFERRAL_URL;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
 import static org.opends.server.messages.JebMessages.
      MSGID_JEB_REFERRAL_RESULT_MESSAGE;
 import static org.opends.server.messages.MessageHandler.getMessage;
@@ -76,11 +78,6 @@
  */
 public class DN2URI
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.backends.jeb.EntryContainer";
 
   /**
    * The standard attribute type that is used to specify the set of referral
@@ -475,7 +472,10 @@
       }
       catch (DirectoryException e)
       {
-        assert debugException(CLASS_NAME, "throwReferralException", e);
+        if (debugEnabled())
+        {
+          debugCought(DebugLogLevel.ERROR, e);
+        }
         // Return the non-LDAP URI as is.
       }
 
@@ -545,11 +545,17 @@
     }
     catch (DatabaseException e)
     {
-      assert debugException(CLASS_NAME, "targetEntryReferrals", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
     }
     catch (UnsupportedEncodingException e)
     {
-      assert debugException(CLASS_NAME, "targetEntryReferrals", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
     }
   }
 
@@ -667,7 +673,10 @@
             }
             catch (DirectoryException e)
             {
-              assert debugException(CLASS_NAME, "returnSearchReferences", e);
+              if (debugEnabled())
+              {
+                debugCought(DebugLogLevel.ERROR, e);
+              }
               // Return the non-LDAP URI as is.
             }
 
@@ -689,11 +698,17 @@
     }
     catch (DatabaseException e)
     {
-      assert debugException(CLASS_NAME, "returnSearchReferences", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
     }
     catch (UnsupportedEncodingException e)
     {
-      assert debugException(CLASS_NAME, "returnSearchReferences", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
     }
 
     return true;

--
Gitblit v1.10.0