Diagnostics changes only:
* Output correct classloader used to load LogFactory implementation * Use word "from" instead of confusing "->" * Other minor improvements to diagnostics messages. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@381828 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1037,7 +1037,7 @@ public abstract class LogFactory {
|
|||||||
if (isDiagnosticsEnabled()) {
|
if (isDiagnosticsEnabled()) {
|
||||||
logDiagnostic(
|
logDiagnostic(
|
||||||
"Factory class " + logFactoryClass.getName()
|
"Factory class " + logFactoryClass.getName()
|
||||||
+ " loaded from classloader " + objectId(classLoader)
|
+ " loaded from classloader " + objectId(logFactoryClass.getClassLoader())
|
||||||
+ " does not extend '" + LogFactory.class.getName()
|
+ " does not extend '" + LogFactory.class.getName()
|
||||||
+ "' as loaded by this classloader.");
|
+ "' as loaded by this classloader.");
|
||||||
logHierarchy("[BAD CL TREE] ", classLoader);
|
logHierarchy("[BAD CL TREE] ", classLoader);
|
||||||
@@ -1319,9 +1319,12 @@ public abstract class LogFactory {
|
|||||||
// In order to avoid confusion where multiple instances of JCL are
|
// In order to avoid confusion where multiple instances of JCL are
|
||||||
// being used via different classloaders within the same app, we
|
// being used via different classloaders within the same app, we
|
||||||
// ensure each logged message has a prefix of form
|
// 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
|
// 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;
|
String classLoaderName;
|
||||||
try {
|
try {
|
||||||
ClassLoader classLoader = thisClassLoader;
|
ClassLoader classLoader = thisClassLoader;
|
||||||
@@ -1333,7 +1336,7 @@ public abstract class LogFactory {
|
|||||||
} catch(SecurityException e) {
|
} catch(SecurityException e) {
|
||||||
classLoaderName = "UNKNOWN";
|
classLoaderName = "UNKNOWN";
|
||||||
}
|
}
|
||||||
diagnosticPrefix = "[LogFactory -> " + classLoaderName + "] ";
|
diagnosticPrefix = "[LogFactory from " + classLoaderName + "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1411,8 +1414,8 @@ public abstract class LogFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logDiagnostic("[ENV] Extension directories: " + System.getProperty("java.ext.dir"));
|
logDiagnostic("[ENV] Extension directories (java.ext.dir): " + System.getProperty("java.ext.dir"));
|
||||||
logDiagnostic("[ENV] Application classpath: " + System.getProperty("java.class.path"));
|
logDiagnostic("[ENV] Application classpath (java.class.path): " + System.getProperty("java.class.path"));
|
||||||
} catch(SecurityException ex) {
|
} catch(SecurityException ex) {
|
||||||
logDiagnostic("[ENV] Security setting prevent interrogation of system classpaths.");
|
logDiagnostic("[ENV] Security setting prevent interrogation of system classpaths.");
|
||||||
}
|
}
|
||||||
@@ -1432,7 +1435,7 @@ public abstract class LogFactory {
|
|||||||
logDiagnostic(
|
logDiagnostic(
|
||||||
"[ENV] Class " + className + " was loaded via classloader "
|
"[ENV] Class " + className + " was loaded via classloader "
|
||||||
+ objectId(classLoader));
|
+ objectId(classLoader));
|
||||||
logHierarchy("[ENV] ", classLoader);
|
logHierarchy("[ENV] Ancestry of classloader which loaded " + className + " is ", classLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user