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/loggers/GZIPAction.java |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/opends/src/server/org/opends/server/loggers/GZIPAction.java b/opends/src/server/org/opends/server/loggers/GZIPAction.java
index fc3237b..372c432 100644
--- a/opends/src/server/org/opends/server/loggers/GZIPAction.java
+++ b/opends/src/server/org/opends/server/loggers/GZIPAction.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2006 Sun Microsystems, Inc.
+ *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
  */
 package org.opends.server.loggers;
 
@@ -32,7 +32,9 @@
 import java.io.IOException;
 import java.util.zip.GZIPOutputStream;
 
-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;
 
 /**
  * This class implements a post rotation action that compresses
@@ -40,11 +42,6 @@
  */
 public class GZIPAction implements PostRotationAction
 {
-  /**
-   * The fully-qualified name of this class for debugging purposes.
-   */
-  private static final String CLASS_NAME =
-    "org.opends.server.loggers.GZIPAction";
 
   private File originalFile;
   private File newFile;
@@ -119,26 +116,37 @@
       return true;
     } catch(IOException ioe)
     {
-      assert debugException(CLASS_NAME, "execute", ioe);
-      if(inputStreamOpen)
+      if (debugEnabled())
+      {
+        debugCought(DebugLogLevel.ERROR, ioe);
+      }
+      if (inputStreamOpen)
       {
         try
         {
           fis.close();
-        } catch(Exception fe)
+        }
+        catch (Exception fe)
         {
-          assert debugException(CLASS_NAME, "execute", fe);
+          if (debugEnabled())
+          {
+            debugCought(DebugLogLevel.ERROR, fe);
+          }
           // Cannot do much. Ignore.
         }
       }
-      if(outputStreamOpen)
+      if (outputStreamOpen)
       {
         try
         {
           gzip.close();
-        } catch(Exception ge)
+        }
+        catch (Exception ge)
         {
-                assert debugException(CLASS_NAME, "execute", ge);
+          if (debugEnabled())
+          {
+            debugCought(DebugLogLevel.ERROR, ge);
+          }
           // Cannot do much. Ignore.
         }
       }

--
Gitblit v1.10.0