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/LDAPConnection.java | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/LDAPConnection.java b/opends/src/server/org/opends/server/tools/LDAPConnection.java
index f8f1d84..0145bba 100644
--- a/opends/src/server/org/opends/server/tools/LDAPConnection.java
+++ b/opends/src/server/org/opends/server/tools/LDAPConnection.java
@@ -51,6 +51,7 @@
import org.opends.server.types.LDAPException;
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.CoreMessages.
MSGID_RESULT_CLIENT_SIDE_CONNECT_ERROR;
@@ -67,6 +68,11 @@
*/
public class LDAPConnection
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
// The hostname to connect to.
private String hostName = null;
@@ -177,7 +183,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ex);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ex);
}
throw new LDAPConnectionException(ex.getMessage(), ex);
}
@@ -198,7 +204,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ex1);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ex1);
}
throw new LDAPConnectionException(ex1.getMessage(), ex1);
}
@@ -248,7 +254,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ex2);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ex2);
}
throw new LDAPConnectionException(ex2.getMessage(), ex2);
}
@@ -263,7 +269,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
// It doesn't matter too much if this throws, so ignore it.
}
@@ -404,7 +410,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ce);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ce);
}
throw new LDAPConnectionException(ce.getMessage(), ce.getExitCode(),
null, ce);
@@ -417,7 +423,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ex);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ex);
}
throw new LDAPConnectionException(ex.getMessage(), ex);
}
--
Gitblit v1.10.0