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/extensions/RandomPasswordGenerator.java | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java b/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
index a2e6d6a..e87f62a 100644
--- a/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
+++ b/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
@@ -54,8 +54,8 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-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.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -72,6 +72,11 @@
extends PasswordGenerator<RandomPasswordGeneratorCfg>
implements ConfigurationChangeListener<RandomPasswordGeneratorCfg>
{
+ /**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
// The current configuration for this password validator.
private RandomPasswordGeneratorCfg currentConfig;
@@ -152,7 +157,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS;
@@ -204,7 +209,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT;
@@ -232,7 +237,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT;
@@ -395,7 +400,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS;
@@ -436,7 +441,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT;
@@ -450,7 +455,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT;
@@ -532,7 +537,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS;
@@ -589,7 +594,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT;
@@ -606,7 +611,7 @@
{
if (debugEnabled())
{
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT;
--
Gitblit v1.10.0