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/tools/LDAPCompare.java | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/LDAPCompare.java b/opends/src/server/org/opends/server/tools/LDAPCompare.java
index eb6d6c3..d37907d 100644
--- a/opends/src/server/org/opends/server/tools/LDAPCompare.java
+++ b/opends/src/server/org/opends/server/tools/LDAPCompare.java
@@ -62,6 +62,7 @@
import org.opends.server.util.args.StringArgument;
import static org.opends.server.loggers.debug.DebugLogger.*;
+import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
@@ -77,6 +78,11 @@
public class LDAPCompare
{
/**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
+ /**
* The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
@@ -212,7 +218,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ae);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ae);
}
if (!compareOptions.continueOnError())
{
@@ -636,7 +642,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_COMPARE_CANNOT_BASE64_DECODE_ASSERTION_VALUE;
@@ -676,7 +682,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ae);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ae);
}
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
@@ -696,7 +702,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ae);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ae);
}
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
@@ -718,7 +724,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ex);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ex);
}
err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH));
return 1;
@@ -900,7 +906,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, le);
+ TRACER.debugCaught(DebugLogLevel.ERROR, le);
}
LDAPToolUtils.printErrorMessage(err, le.getMessage(), le.getResultCode(),
le.getErrorMessage(), le.getMatchedDN());
@@ -910,7 +916,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, lce);
+ TRACER.debugCaught(DebugLogLevel.ERROR, lce);
}
LDAPToolUtils.printErrorMessage(err, lce.getMessage(),
lce.getResultCode(),
@@ -922,7 +928,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
return 1;
--
Gitblit v1.10.0