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/AddOperation.java | 51 ++++++++++++++++++++++++++++-----------------------
1 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/AddOperation.java b/opends/src/server/org/opends/server/core/AddOperation.java
index fd411d3..ea10a1a 100644
--- a/opends/src/server/org/opends/server/core/AddOperation.java
+++ b/opends/src/server/org/opends/server/core/AddOperation.java
@@ -93,10 +93,10 @@
import static org.opends.server.config.ConfigConstants.*;
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.*;
@@ -114,6 +114,11 @@
implements PreParseAddOperation, PreOperationAddOperation,
PostOperationAddOperation, PostResponseAddOperation
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
// The set of response controls to send to the client.
private ArrayList<Control> responseControls;
@@ -833,7 +838,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1069,7 +1074,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
logError(ErrorLogCategory.SYNCHRONIZATION,
@@ -1101,7 +1106,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1137,7 +1142,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
break;
}
@@ -1158,7 +1163,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1401,7 +1406,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
int msgID = MSGID_ADD_INVALID_PWPOLICY_DN_SYNTAX;
@@ -1438,7 +1443,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResponseData(de);
@@ -1657,7 +1662,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -1686,7 +1691,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -1719,7 +1724,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -1757,7 +1762,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -1777,7 +1782,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1835,7 +1840,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -1855,7 +1860,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -2051,7 +2056,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
logError(ErrorLogCategory.SYNCHRONIZATION,
@@ -2124,7 +2129,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -2138,7 +2143,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, coe);
+ TRACER.debugCaught(DebugLogLevel.ERROR, coe);
}
CancelResult cancelResult = coe.getCancelResult();
@@ -2180,7 +2185,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
logError(ErrorLogCategory.SYNCHRONIZATION,
@@ -2238,7 +2243,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADD_ERROR_NOTIFYING_CHANGE_LISTENER;
@@ -2276,7 +2281,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADD_ERROR_NOTIFYING_PERSISTENT_SEARCH;
@@ -2542,7 +2547,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
--
Gitblit v1.10.0