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/synchronization/plugin/HeartbeatMonitor.java |   34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java b/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java
index 2065217..65147be 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java
@@ -29,10 +29,8 @@
 
 import org.opends.server.api.DirectoryThread;
 import org.opends.server.synchronization.protocol.ProtocolSession;
-import static org.opends.server.loggers.Debug.debugMessage;
-import static org.opends.server.types.DebugLogCategory.SYNCHRONIZATION;
-import static org.opends.server.types.DebugLogSeverity.INFO;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
 import java.io.IOException;
 
 /**
@@ -41,11 +39,6 @@
  */
 public class HeartbeatMonitor extends DirectoryThread
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-       "org.opends.server.synchronization.plugin.HeartbeatMonitor";
 
 
   /**
@@ -97,9 +90,11 @@
   @Override
   public void run()
   {
-    debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
-                 "Heartbeat monitor is starting, expected interval is "
-                      + heartbeatInterval);
+    if (debugEnabled())
+    {
+      debugInfo("Heartbeat monitor is starting, expected interval is %d",
+                heartbeatInterval);
+    }
     try
     {
       while (!shutdown)
@@ -109,10 +104,11 @@
         if (now > lastReceiveTime + 2 * heartbeatInterval)
         {
           // Heartbeat is well overdue so the server is assumed to be dead.
-          debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
-                       "Heartbeat monitor is closing the broker " +
-                            "session because it could not detect a " +
-                            "heartbeat.");
+          if (debugEnabled())
+          {
+            debugInfo("Heartbeat monitor is closing the broker session " +
+                "because it could not detect a heartbeat.");
+          }
           session.close();
           break;
         }
@@ -132,8 +128,10 @@
     }
     finally
     {
-      debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
-                   "Heartbeat monitor is exiting.");
+      if (debugEnabled())
+      {
+        debugInfo("Heartbeat monitor is exiting.");
+      }
     }
   }
 }

--
Gitblit v1.10.0