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/CompareOperation.java | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/CompareOperation.java b/opends/src/server/org/opends/server/core/CompareOperation.java
index 8997a4a..1b156de 100644
--- a/opends/src/server/org/opends/server/core/CompareOperation.java
+++ b/opends/src/server/org/opends/server/core/CompareOperation.java
@@ -68,8 +68,8 @@
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 static org.opends.server.loggers.debug.DebugLogger.*;
+import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -88,6 +88,11 @@
implements PreParseCompareOperation, PreOperationCompareOperation,
PostOperationCompareOperation, PostResponseCompareOperation
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
// The attribute type for this compare operation.
private AttributeType attributeType;
@@ -607,7 +612,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -693,7 +698,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
break;
}
@@ -708,7 +713,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -744,7 +749,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -773,7 +778,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -813,7 +818,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -833,7 +838,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -891,7 +896,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
setResultCode(ResultCode.valueOf(le.getResultCode()));
@@ -911,7 +916,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, de);
+ TRACER.debugCaught(DebugLogLevel.ERROR, de);
}
setResultCode(de.getResultCode());
@@ -1175,7 +1180,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
--
Gitblit v1.10.0