Sun classloaders typically have very bad toString methods. Others (for example, IDM classloaders) output useful information. Added toString call which may be very useful in the latter case.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@377189 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1377,6 +1377,10 @@ public abstract class LogFactory {
|
||||
logDiagnostic(
|
||||
"[ENV] Class " + className + " was loaded via classloader "
|
||||
+ objectId(classLoader));
|
||||
if (classLoader != null) {
|
||||
final String classLoaderString = classLoader.toString();
|
||||
logDiagnostic("[ENV] " + objectId(classLoader) + " == '" + classLoaderString + "'");
|
||||
}
|
||||
|
||||
try {
|
||||
systemClassLoader = ClassLoader.getSystemClassLoader();
|
||||
@@ -1385,7 +1389,6 @@ public abstract class LogFactory {
|
||||
"[ENV] Security forbids determining the system classloader.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (classLoader != null) {
|
||||
StringBuffer buf = new StringBuffer("[ENV] ClassLoader tree:");
|
||||
for(;;) {
|
||||
|
||||
Reference in New Issue
Block a user