You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2006/03/01 00:32:33 UTC
svn commit: r381828 -
/jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Author: skitching
Date: Tue Feb 28 15:32:27 2006
New Revision: 381828
URL: http://svn.apache.org/viewcvs?rev=381828&view=rev
Log:
Diagnostics changes only:
* Output correct classloader used to load LogFactory implementation
* Use word "from" instead of confusing "->"
* Other minor improvements to diagnostics messages.
Modified:
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Modified: jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java?rev=381828&r1=381827&r2=381828&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java (original)
+++ jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java Tue Feb 28 15:32:27 2006
@@ -1037,7 +1037,7 @@
if (isDiagnosticsEnabled()) {
logDiagnostic(
"Factory class " + logFactoryClass.getName()
- + " loaded from classloader " + objectId(classLoader)
+ + " loaded from classloader " + objectId(logFactoryClass.getClassLoader())
+ " does not extend '" + LogFactory.class.getName()
+ "' as loaded by this classloader.");
logHierarchy("[BAD CL TREE] ", classLoader);
@@ -1319,9 +1319,12 @@
// In order to avoid confusion where multiple instances of JCL are
// being used via different classloaders within the same app, we
// ensure each logged message has a prefix of form
- // [LogFactory --> classloader OID]
+ // [LogFactory from classloader OID]
+ //
// Note that this prefix should be kept consistent with that
- // in LogFactoryImpl
+ // in LogFactoryImpl. However here we don't need to output info
+ // about the actual *instance* of LogFactory, as all methods that
+ // output diagnostics from this class are static.
String classLoaderName;
try {
ClassLoader classLoader = thisClassLoader;
@@ -1333,7 +1336,7 @@
} catch(SecurityException e) {
classLoaderName = "UNKNOWN";
}
- diagnosticPrefix = "[LogFactory -> " + classLoaderName + "] ";
+ diagnosticPrefix = "[LogFactory from " + classLoaderName + "] ";
}
/**
@@ -1411,8 +1414,8 @@
}
try {
- logDiagnostic("[ENV] Extension directories: " + System.getProperty("java.ext.dir"));
- logDiagnostic("[ENV] Application classpath: " + System.getProperty("java.class.path"));
+ logDiagnostic("[ENV] Extension directories (java.ext.dir): " + System.getProperty("java.ext.dir"));
+ logDiagnostic("[ENV] Application classpath (java.class.path): " + System.getProperty("java.class.path"));
} catch(SecurityException ex) {
logDiagnostic("[ENV] Security setting prevent interrogation of system classpaths.");
}
@@ -1432,7 +1435,7 @@
logDiagnostic(
"[ENV] Class " + className + " was loaded via classloader "
+ objectId(classLoader));
- logHierarchy("[ENV] ", classLoader);
+ logHierarchy("[ENV] Ancestry of classloader which loaded " + className + " is ", classLoader);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org