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/PasswordPolicyImportPlugin.java |   25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java b/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
index 318a3c7..2483b9e 100644
--- a/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -55,7 +55,9 @@
 import org.opends.server.types.ErrorLogSeverity;
 import org.opends.server.types.LDIFImportConfig;
 
-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;
 import static org.opends.server.loggers.Error.*;
 import static org.opends.server.messages.MessageHandler.*;
 import static org.opends.server.messages.PluginMessages.*;
@@ -71,11 +73,6 @@
 public final class PasswordPolicyImportPlugin
        extends DirectoryServerPlugin
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.plugins.PasswordPolicyImportPlugin";
 
 
 
@@ -99,7 +96,6 @@
   {
     super();
 
-    assert debugConstructor(CLASS_NAME);
 
 
     // Get the password policies from the Directory Server configuration.  This
@@ -183,9 +179,6 @@
                                      ConfigEntry configEntry)
          throws ConfigException
   {
-    assert debugEnter(CLASS_NAME, "initializePlugin",
-                      String.valueOf(pluginTypes),
-                      String.valueOf(configEntry));
 
 
     // Make sure that the plugin has been enabled for the appropriate types.
@@ -215,8 +208,6 @@
   public final LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig,
                                              Entry entry)
   {
-    assert debugEnter(CLASS_NAME, "doLDIFImport",
-                      String.valueOf(importConfig), String.valueOf(entry));
 
 
     // Create a list that we will use to hold new encoded values.
@@ -258,7 +249,10 @@
             }
             catch (Exception e)
             {
-              assert debugException(CLASS_NAME, "doLDIFImport", e);
+              if (debugEnabled())
+              {
+                debugCought(DebugLogLevel.ERROR, e);
+              }
 
               int    msgID   = MSGID_PLUGIN_PWPIMPORT_ERROR_ENCODING_PASSWORD;
               String message = getMessage(msgID, t.getNameOrOID(),
@@ -316,7 +310,10 @@
             }
             catch (Exception e)
             {
-              assert debugException(CLASS_NAME, "doLDIFImport", e);
+              if (debugEnabled())
+              {
+                debugCought(DebugLogLevel.ERROR, e);
+              }
 
               int    msgID   = MSGID_PLUGIN_PWPIMPORT_ERROR_ENCODING_PASSWORD;
               String message = getMessage(msgID, t.getNameOrOID(),

--
Gitblit v1.10.0