From b0a7e3cf4a65ea95c79cf002596428d0aed2e26e Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Tue, 22 May 2007 23:30:15 +0000
Subject: [PATCH] Remove the dependence on AspectJ for all non method-entry and method-exit related debug messages. All debug statements will now work w/o weaving enabled. However, method-entry and method-exit debug messages work only with weaving enabled.
---
opends/src/server/org/opends/server/core/DeleteOperation.java | 45 +++++++++++++++++++++++++--------------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DeleteOperation.java b/opends/src/server/org/opends/server/core/DeleteOperation.java
index fa4bad3..9457386 100644
--- a/opends/src/server/org/opends/server/core/DeleteOperation.java
+++ b/opends/src/server/org/opends/server/core/DeleteOperation.java
@@ -74,10 +74,10 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.AccessLogger.*;
-import static org.opends.server.loggers.debug.DebugLogger.debugCaught;
-import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.ErrorLogger.*;
+import static org.opends.server.loggers.debug.DebugLogger.*;
+import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -94,6 +94,11 @@
implements PreParseDeleteOperation, PreOperationDeleteOperation,
PostOperationDeleteOperation, PostResponseDeleteOperation
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
@@ -558,7 +563,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -620,7 +625,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
@@ -631,7 +636,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -660,7 +665,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
logError(ErrorLogCategory.SYNCHRONIZATION,
@@ -707,7 +712,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -736,7 +741,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -769,7 +774,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -807,7 +812,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -827,7 +832,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -885,7 +890,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -905,7 +910,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1122,7 +1127,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
logError(ErrorLogCategory.SYNCHRONIZATION,
@@ -1195,7 +1200,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1209,7 +1214,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, coe);
+ TRACER.debugCaught(DebugLogLevel.ERROR, coe);
}
CancelResult cancelResult = coe.getCancelResult();
@@ -1241,7 +1246,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
logError(ErrorLogCategory.SYNCHRONIZATION,
@@ -1295,7 +1300,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_DELETE_ERROR_NOTIFYING_CHANGE_LISTENER;
@@ -1333,7 +1338,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_DELETE_ERROR_NOTIFYING_PERSISTENT_SEARCH;
@@ -1375,7 +1380,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
--
Gitblit v1.10.0