From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete. 

---
 opends/src/server/org/opends/server/backends/task/RecurringTask.java |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/task/RecurringTask.java b/opends/src/server/org/opends/server/backends/task/RecurringTask.java
index 4494d6b..816af4b 100644
--- a/opends/src/server/org/opends/server/backends/task/RecurringTask.java
+++ b/opends/src/server/org/opends/server/backends/task/RecurringTask.java
@@ -43,7 +43,9 @@
 import org.opends.server.types.ResultCode;
 
 import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
 import static org.opends.server.messages.BackendMessages.*;
 import static org.opends.server.messages.MessageHandler.*;
 import static org.opends.server.util.StaticUtils.*;
@@ -56,11 +58,6 @@
  */
 public class RecurringTask
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.backends.task.RecurringTask";
 
 
 
@@ -98,8 +95,6 @@
   public RecurringTask(TaskScheduler taskScheduler, Entry recurringTaskEntry)
          throws DirectoryException
   {
-    assert debugConstructor(CLASS_NAME, String.valueOf(taskScheduler),
-                            String.valueOf(recurringTaskEntry));
 
     this.taskScheduler        = taskScheduler;
     this.recurringTaskEntry   = recurringTaskEntry;
@@ -217,7 +212,10 @@
     }
     catch (Exception e)
     {
-      assert debugException(CLASS_NAME, "<init>", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
 
       int    msgID   = MSGID_RECURRINGTASK_CANNOT_LOAD_CLASS;
       String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -236,7 +234,10 @@
     }
     catch (Exception e)
     {
-      assert debugException(CLASS_NAME, "<init>", e);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, e);
+      }
 
       int    msgID   = MSGID_RECURRINGTASK_CANNOT_INSTANTIATE_CLASS_AS_TASK;
       String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -254,7 +255,10 @@
     }
     catch (InitializationException ie)
     {
-      assert debugException(CLASS_NAME, "<init>", ie);
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ie);
+      }
 
       int    msgID   = MSGID_RECURRINGTASK_CANNOT_INITIALIZE_INTERNAL;
       String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -275,7 +279,6 @@
    */
   public String getRecurringTaskID()
   {
-    assert debugEnter(CLASS_NAME, "getRecurringTaskID");
 
     return recurringTaskID;
   }
@@ -289,7 +292,6 @@
    */
   public DN getRecurringTaskEntryDN()
   {
-    assert debugEnter(CLASS_NAME, "getRecurringTaskEntryDN");
 
     return recurringTaskEntryDN;
   }
@@ -303,7 +305,6 @@
    */
   public Entry getRecurringTaskEntry()
   {
-    assert debugEnter(CLASS_NAME, "getRecurringTaskEntry");
 
     return recurringTaskEntry;
   }
@@ -319,7 +320,6 @@
    */
   public String getTaskClassName()
   {
-    assert debugEnter(CLASS_NAME, "getTaskClassName");
 
     return taskClassName;
   }
@@ -333,7 +333,6 @@
    */
   public Task scheduleNextIteration()
   {
-    assert debugEnter(CLASS_NAME, "scheduleNextIteration");
 
     // NYI
     return null;

--
Gitblit v1.10.0