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/plugins/LDAPADListPlugin.java |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java b/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
index 92e1b9e..e7d7754 100644
--- a/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.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.plugins;
 
@@ -36,13 +36,13 @@
 import org.opends.server.config.ConfigEntry;
 import org.opends.server.config.ConfigException;
 import org.opends.server.types.AttributeType;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
 import org.opends.server.types.DirectoryConfig;
 import org.opends.server.types.ObjectClass;
 import org.opends.server.types.operation.PreParseSearchOperation;
 
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static org.opends.server.loggers.debug.DebugLogger.debugWarning;
 import static org.opends.server.messages.MessageHandler.*;
 import static org.opends.server.messages.PluginMessages.*;
 import static org.opends.server.util.ServerConstants.*;
@@ -59,8 +59,6 @@
 public final class LDAPADListPlugin
        extends DirectoryServerPlugin
 {
-  private static final String CLASS_NAME =
-      "org.opends.server.plugins.LDAPADListPlugin";
 
 
 
@@ -74,7 +72,6 @@
   {
     super();
 
-    assert debugConstructor(CLASS_NAME);
   }
 
 
@@ -87,8 +84,6 @@
                                      ConfigEntry configEntry)
          throws ConfigException
   {
-    assert debugEnter(CLASS_NAME, "initializePlugin",
-                      String.valueOf(pluginTypes), String.valueOf(configEntry));
 
 
     // The set of plugin types must contain only the pre-parse search element.
@@ -127,8 +122,6 @@
   public final PreParsePluginResult
        doPreParse(PreParseSearchOperation searchOperation)
   {
-    assert debugEnter(CLASS_NAME, "doPreParseSearch",
-          String.valueOf(searchOperation));
 
 
     // Iterate through the requested attributes to see if any of them start with
@@ -156,15 +149,17 @@
           ObjectClass oc = DirectoryConfig.getObjectClass(lowerName, false);
           if (oc == null)
           {
-            debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.WARNING,
-                         CLASS_NAME, "doPreParse",
-                         "Cannot replace unknown objectclass " + lowerName);
+            if (debugEnabled())
+            {
+              debugWarning("Cannot replace unknown objectclass %s", lowerName);
+            }
           }
           else
           {
-            debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.INFO,
-                         CLASS_NAME, "doPreParse",
-                         "Replacing objectclass " + lowerName);
+            if (debugEnabled())
+            {
+              debugInfo("Replacing objectclass %s", lowerName);
+            }
 
             for (AttributeType at : oc.getRequiredAttributeChain())
             {

--
Gitblit v1.10.0