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/LastModPlugin.java | 31 ++++++++++++-------------------
1 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/opends/src/server/org/opends/server/plugins/LastModPlugin.java b/opends/src/server/org/opends/server/plugins/LastModPlugin.java
index aad5ab9..f8f6f14 100644
--- a/opends/src/server/org/opends/server/plugins/LastModPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/LastModPlugin.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;
@@ -51,7 +51,9 @@
import org.opends.server.types.operation.PreOperationModifyDNOperation;
import static org.opends.server.config.ConfigConstants.*;
-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.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
import static org.opends.server.util.TimeThread.*;
@@ -67,11 +69,6 @@
public final class LastModPlugin
extends DirectoryServerPlugin
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.LastModPlugin";
@@ -99,7 +96,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Get the attribute types for the attributes that we will use. This needs
@@ -125,9 +121,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.
@@ -159,8 +152,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(addOperation));
// Create the attribute list for the creatorsName attribute, if appropriate.
@@ -212,8 +203,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(modifyOperation));
// Create the modifiersName attribute.
@@ -241,7 +230,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "doPreOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// This should never happen.
modifyOperation.setResultCode(DirectoryConfig.getServerErrorResultCode());
@@ -265,7 +257,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "doPreOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// This should never happen.
modifyOperation.setResultCode(DirectoryConfig.getServerErrorResultCode());
@@ -287,8 +282,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(modifyDNOperation));
// Create the modifiersName attribute.
--
Gitblit v1.10.0