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/config/DNConfigAttribute.java |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/opends/src/server/org/opends/server/config/DNConfigAttribute.java b/opends/src/server/org/opends/server/config/DNConfigAttribute.java
index da7e202..f393d96 100644
--- a/opends/src/server/org/opends/server/config/DNConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/DNConfigAttribute.java
@@ -48,8 +48,8 @@
 
 import static org.opends.server.config.ConfigConstants.*;
 import static org.opends.server.loggers.ErrorLogger.*;
-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 static org.opends.server.messages.ConfigMessages.*;
 import static org.opends.server.messages.MessageHandler.*;
 
@@ -61,6 +61,11 @@
 public class DNConfigAttribute
        extends ConfigAttribute
 {
+  /**
+   * The tracer object for the debug logger.
+   */
+  private static final DebugTracer TRACER = getTracer();
+
 
 
 
@@ -582,7 +587,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       rejectReason.append(getMessage(MSGID_CONFIG_ATTR_DN_CANNOT_PARSE,
@@ -676,7 +681,7 @@
       {
         if (debugEnabled())
         {
-          debugCaught(DebugLogLevel.ERROR, e);
+          TRACER.debugCaught(DebugLogLevel.ERROR, e);
         }
 
         int    msgID   = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
@@ -854,7 +859,7 @@
               {
                 if (debugEnabled())
                 {
-                  debugCaught(DebugLogLevel.ERROR, e);
+                  TRACER.debugCaught(DebugLogLevel.ERROR, e);
                 }
 
                 int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
@@ -927,7 +932,7 @@
             {
               if (debugEnabled())
               {
-                debugCaught(DebugLogLevel.ERROR, e);
+                TRACER.debugCaught(DebugLogLevel.ERROR, e);
               }
 
               int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
@@ -1219,7 +1224,7 @@
       {
         if (debugEnabled())
         {
-          debugCaught(DebugLogLevel.ERROR, e);
+          TRACER.debugCaught(DebugLogLevel.ERROR, e);
         }
 
         int    msgID   = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
@@ -1264,7 +1269,7 @@
             {
               if (debugEnabled())
               {
-                debugCaught(DebugLogLevel.ERROR, e);
+                TRACER.debugCaught(DebugLogLevel.ERROR, e);
               }
 
               int    msgID   = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
@@ -1282,7 +1287,7 @@
         {
           if (debugEnabled())
           {
-            debugCaught(DebugLogLevel.ERROR, ce);
+            TRACER.debugCaught(DebugLogLevel.ERROR, ce);
           }
 
           throw ce;
@@ -1291,7 +1296,7 @@
         {
           if (debugEnabled())
           {
-            debugCaught(DebugLogLevel.ERROR, e);
+            TRACER.debugCaught(DebugLogLevel.ERROR, e);
           }
 
           int msgID = MSGID_CONFIG_ATTR_INVALID_DN_VALUE;

--
Gitblit v1.10.0