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/admin/ClassLoaderProvider.java | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/admin/ClassLoaderProvider.java b/opends/src/server/org/opends/server/admin/ClassLoaderProvider.java
index 273edd8..21b56a4 100644
--- a/opends/src/server/org/opends/server/admin/ClassLoaderProvider.java
+++ b/opends/src/server/org/opends/server/admin/ClassLoaderProvider.java
@@ -30,6 +30,7 @@
import static org.opends.server.loggers.ErrorLogger.logError;
import static org.opends.server.loggers.debug.DebugLogger.*;
+import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.AdminMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
@@ -79,6 +80,11 @@
public final class ClassLoaderProvider {
/**
+ * The tracer object for the debug logger.
+ */
+ private static final DebugTracer TRACER = getTracer();
+
+ /**
* Private URLClassLoader implementation. This is only required so
* that we can provide access to the addURL method.
*/
@@ -360,7 +366,7 @@
loader.addJarFile(extension);
} catch (Exception e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_OPEN_JAR_FILE;
@@ -437,12 +443,12 @@
addExtension(extensionsPath.listFiles(filter));
} catch (InitializationException e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
throw e;
} catch (Exception e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_EXTENSIONS_CANNOT_LIST_FILES;
@@ -477,7 +483,7 @@
loadDefinitionClasses(is);
} catch (IOException e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_READ_CORE_MANIFEST;
@@ -486,7 +492,7 @@
throw new InitializationException(msgID, message);
} catch (Exception e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_CORE_MANIFEST;
@@ -519,7 +525,7 @@
is = jarFile.getInputStream(entry);
} catch (Exception e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_READ_EXTENSION_MANIFEST;
@@ -532,7 +538,7 @@
loadDefinitionClasses(is);
} catch (IOException e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_READ_EXTENSION_MANIFEST;
@@ -541,7 +547,7 @@
throw new InitializationException(msgID, message);
} catch (Exception e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_EXTENSION_MANIFEST;
@@ -595,7 +601,7 @@
continue;
}
- debugMessage(DebugLogLevel.INFO, "Loading class " + className);
+ TRACER.debugMessage(DebugLogLevel.INFO, "Loading class " + className);
// Use the underlying loader.
Class.forName(className, true, loader);
@@ -622,7 +628,7 @@
jarFile = new JarFile(jar);
} catch (Exception e) {
if (debugEnabled()) {
- debugCaught(DebugLogLevel.ERROR, e);
+ TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
int msgID = MSGID_ADMIN_CANNOT_OPEN_JAR_FILE;
--
Gitblit v1.10.0