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/core/PasswordPolicyConfig.java | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java b/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
index febcd4f..464fe20 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
@@ -36,8 +36,8 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-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.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
@@ -52,6 +52,11 @@
public class PasswordPolicyConfig
implements ConfigurationChangeListener<PasswordPolicyCfg>
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
/**
* The password policy object corresponding to the configuration entry. The
@@ -93,7 +98,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ce);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ce);
}
unacceptableReasons.add(ce.getMessage());
@@ -103,7 +108,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ie);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ie);
}
unacceptableReasons.add(ie.getMessage());
@@ -136,7 +141,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ce);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ce);
}
ArrayList<String> messages = new ArrayList<String>();
messages.add(ce.getMessage());
@@ -148,7 +153,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, ie);
+ TRACER.debugCaught(DebugLogLevel.ERROR, ie);
}
ArrayList<String> messages = new ArrayList<String>();
messages.add(ie.getMessage());
--
Gitblit v1.10.0