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/backends/MonitorBackend.java | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/MonitorBackend.java b/opends/src/server/org/opends/server/backends/MonitorBackend.java
index 25990d1..4b04068 100644
--- a/opends/src/server/org/opends/server/backends/MonitorBackend.java
+++ b/opends/src/server/org/opends/server/backends/MonitorBackend.java
@@ -70,8 +70,8 @@
import org.opends.server.util.Validator;
import static org.opends.server.config.ConfigConstants.*;
-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.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -93,6 +93,12 @@
extends Backend
implements ConfigurationChangeListener<BackendCfg>
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
+
// The set of user-defined attributes that will be included in the base
// monitor entry.
private ArrayList<Attribute> userDefinedAttributes;
@@ -209,7 +215,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_MONITOR_CANNOT_DECODE_MONITOR_ROOT_DN;
@@ -243,7 +249,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
@@ -278,7 +284,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -978,7 +984,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER;
@@ -997,7 +1003,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
try
@@ -1008,7 +1014,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e2);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e2);
}
}
@@ -1032,7 +1038,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
try
@@ -1043,7 +1049,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e2);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e2);
}
}
@@ -1066,7 +1072,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
@@ -1282,7 +1288,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
--
Gitblit v1.10.0