1
0

Added content prefixes for LogFactory bootstrap diagnostics. Also added message to indicate when the bootstrap has been completed.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@377152 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Burrell Donkin
2006-02-12 11:12:11 +00:00
parent 796501a41d
commit 51a1fcbddd

View File

@@ -1355,10 +1355,10 @@ public abstract class LogFactory {
} }
try { try {
logDiagnostic("Extension directories: " + System.getProperty("java.ext.dir")); logDiagnostic("[ENV] Extension directories: " + System.getProperty("java.ext.dir"));
logDiagnostic("Application classpath: " + System.getProperty("java.class.path")); logDiagnostic("[ENV] Application classpath: " + System.getProperty("java.class.path"));
} catch(SecurityException ex) { } catch(SecurityException ex) {
logDiagnostic("Security setting prevent interrogation of system classpaths."); logDiagnostic("[ENV] Security setting prevent interrogation of system classpaths.");
} }
String className = clazz.getName(); String className = clazz.getName();
@@ -1370,24 +1370,24 @@ public abstract class LogFactory {
} catch(SecurityException ex) { } catch(SecurityException ex) {
// not much useful diagnostics we can print here! // not much useful diagnostics we can print here!
logDiagnostic( logDiagnostic(
"Security forbids determining the classloader for " + className); "[ENV] Security forbids determining the classloader for " + className);
return; return;
} }
logDiagnostic( logDiagnostic(
"Class " + className + " was loaded via classloader " "[ENV] Class " + className + " was loaded via classloader "
+ objectId(classLoader)); + objectId(classLoader));
try { try {
systemClassLoader = ClassLoader.getSystemClassLoader(); systemClassLoader = ClassLoader.getSystemClassLoader();
} catch(SecurityException ex) { } catch(SecurityException ex) {
logDiagnostic( logDiagnostic(
"Security forbids determining the system classloader."); "[ENV] Security forbids determining the system classloader.");
return; return;
} }
if (classLoader != null) { if (classLoader != null) {
StringBuffer buf = new StringBuffer("ClassLoader tree:"); StringBuffer buf = new StringBuffer("[ENV] ClassLoader tree:");
for(;;) { for(;;) {
buf.append(objectId(classLoader)); buf.append(objectId(classLoader));
if (classLoader == systemClassLoader) { if (classLoader == systemClassLoader) {
@@ -1456,6 +1456,6 @@ public abstract class LogFactory {
initDiagnostics(); initDiagnostics();
logClassLoaderTree(LogFactory.class); logClassLoaderTree(LogFactory.class);
factories = createFactoryStore(); factories = createFactoryStore();
logDiagnostic("BOOTSTRAP COMPLETED");
} }
} }