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/extensions/FIFOEntryCache.java |   53 +++++++++++++++++++++++++++++------------------------
 1 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
index c8b40d5..d8bab05 100644
--- a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
@@ -61,8 +61,8 @@
 import org.opends.server.types.SearchFilter;
 
 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.ExtensionsMessages.*;
 import static org.opends.server.messages.MessageHandler.*;
@@ -99,6 +99,11 @@
        extends EntryCache <FIFOEntryCacheCfg>
        implements ConfigurationChangeListener<FIFOEntryCacheCfg>
 {
+  /**
+   * The tracer object for the debug logger.
+   */
+  private static final DebugTracer TRACER = getTracer();
+
 
 
 
@@ -224,7 +229,7 @@
       // This should never happen.
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
     }
     finally
@@ -321,7 +326,7 @@
           {
             if (debugEnabled())
             {
-              debugCaught(DebugLogLevel.ERROR, e);
+              TRACER.debugCaught(DebugLogLevel.ERROR, e);
             }
 
             // The attempt to add the lock to the list failed, so we need to
@@ -334,7 +339,7 @@
             {
               if (debugEnabled())
               {
-                debugCaught(DebugLogLevel.ERROR, e2);
+                TRACER.debugCaught(DebugLogLevel.ERROR, e2);
               }
             }
 
@@ -361,7 +366,7 @@
           {
             if (debugEnabled())
             {
-              debugCaught(DebugLogLevel.ERROR, e);
+              TRACER.debugCaught(DebugLogLevel.ERROR, e);
             }
 
             // The attempt to add the lock to the list failed, so we need to
@@ -374,7 +379,7 @@
             {
               if (debugEnabled())
               {
-                debugCaught(DebugLogLevel.ERROR, e2);
+                TRACER.debugCaught(DebugLogLevel.ERROR, e2);
               }
             }
 
@@ -441,7 +446,7 @@
           {
             if (debugEnabled())
             {
-              debugCaught(DebugLogLevel.ERROR, e);
+              TRACER.debugCaught(DebugLogLevel.ERROR, e);
             }
 
             // The attempt to add the lock to the list failed, so we need to
@@ -454,7 +459,7 @@
             {
               if (debugEnabled())
               {
-                debugCaught(DebugLogLevel.ERROR, e2);
+                TRACER.debugCaught(DebugLogLevel.ERROR, e2);
               }
             }
 
@@ -481,7 +486,7 @@
           {
             if (debugEnabled())
             {
-              debugCaught(DebugLogLevel.ERROR, e);
+              TRACER.debugCaught(DebugLogLevel.ERROR, e);
             }
 
             // The attempt to add the lock to the list failed, so we need to
@@ -494,7 +499,7 @@
             {
               if (debugEnabled())
               {
-                debugCaught(DebugLogLevel.ERROR, e2);
+                TRACER.debugCaught(DebugLogLevel.ERROR, e2);
               }
             }
 
@@ -536,7 +541,7 @@
         {
           if (debugEnabled())
           {
-            debugCaught(DebugLogLevel.ERROR, e);
+            TRACER.debugCaught(DebugLogLevel.ERROR, e);
           }
 
           // This shouldn't happen, but if it does then we can't be sure whether
@@ -566,7 +571,7 @@
         {
           if (debugEnabled())
           {
-            debugCaught(DebugLogLevel.ERROR, e);
+            TRACER.debugCaught(DebugLogLevel.ERROR, e);
           }
 
           // This shouldn't happen, but if it does, then just ignore it.
@@ -596,7 +601,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       return;
@@ -673,7 +678,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       return;
@@ -708,7 +713,7 @@
         {
           if (debugEnabled())
           {
-            debugCaught(DebugLogLevel.ERROR, e);
+            TRACER.debugCaught(DebugLogLevel.ERROR, e);
           }
 
           // This shouldn't happen, but if it does then we can't be sure whether
@@ -738,7 +743,7 @@
         {
           if (debugEnabled())
           {
-            debugCaught(DebugLogLevel.ERROR, e);
+            TRACER.debugCaught(DebugLogLevel.ERROR, e);
           }
 
           // This shouldn't happen, but if it does, then just ignore it.
@@ -769,7 +774,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // We can't rule out the possibility of a conflict, so return false.
@@ -859,7 +864,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // We can't be sure there wasn't a conflict, so return false.
@@ -914,7 +919,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // This shouldn't happen, but there's not much that we can do if it does.
@@ -951,7 +956,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // This shouldn't happen, but there's not much that we can do if it does.
@@ -1012,7 +1017,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // This shouldn't happen, but there's not much that we can do if it does.
@@ -1054,7 +1059,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // This shouldn't happen, but there's not much that we can do if it does.
@@ -1178,7 +1183,7 @@
     {
       if (debugEnabled())
       {
-        debugCaught(DebugLogLevel.ERROR, e);
+        TRACER.debugCaught(DebugLogLevel.ERROR, e);
       }
 
       // This shouldn't happen, but there's not much that we can do if it does.

--
Gitblit v1.10.0