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/RotationConfigUtil.java | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java b/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java
index a101c50..6cd185a 100644
--- a/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java
+++ b/opends/src/server/org/opends/server/loggers/RotationConfigUtil.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;
@@ -42,14 +42,15 @@
import org.opends.server.config.StringConfigAttribute;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.LoggerMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.loggers.Error.*;
-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;
/**
@@ -58,8 +59,6 @@
*/
public class RotationConfigUtil
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.RotationConfigUtil";
/**
@@ -78,8 +77,6 @@
getRotationPolicies(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getRotationPolicies",
- String.valueOf(configEntry));
HashSet<String> allowedValues = new HashSet<String>();
allowedValues.add("size");
@@ -210,8 +207,6 @@
getRetentionPolicies(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getRetentionPolicies",
- String.valueOf(configEntry));
StringConfigAttribute logFileStub =
new StringConfigAttribute(ATTR_LOGGER_FILE,
@@ -348,8 +343,7 @@
getPostRotationActions(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getPostRotationActions",
- String.valueOf(configEntry));
+
ArrayList<ActionType> actions = new ArrayList<ActionType>();
StringConfigAttribute rotationActionStub =
@@ -425,7 +419,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getCertificateAlias", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return null;
}
@@ -450,8 +447,7 @@
public static int getIntegerAttribute(ConfigEntry configEntry,
String attrName, int msgID) throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getIntegerAttribute",
- String.valueOf(configEntry), attrName);
+
int value = -1;
IntegerConfigAttribute attrStub =
--
Gitblit v1.10.0