in src/main/java/org/apache/commons/logging/LogFactory.java [1674:1705]
static {
// note: it's safe to call methods before initDiagnostics (though
// diagnostic output gets discarded).
ClassLoader thisClassLoader = getClassLoader(LogFactory.class);
thisClassLoaderRef = new WeakReference<ClassLoader>(thisClassLoader);
// 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 from classloader OID]
//
// Note that this prefix should be kept consistent with that
// 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 {
if (thisClassLoader == null) {
classLoaderName = "BOOTLOADER";
} else {
classLoaderName = objectId(thisClassLoader);
}
} catch (final SecurityException e) {
classLoaderName = "UNKNOWN";
}
diagnosticPrefix = "[LogFactory from " + classLoaderName + "] ";
DIAGNOSTICS_STREAM = initDiagnostics();
logClassLoaderEnvironment(LogFactory.class);
factories = createFactoryStore();
if (isDiagnosticsEnabled()) {
logDiagnostic("BOOTSTRAP COMPLETED");
}
}