in src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java [418:441]
private void initDiagnostics() {
// It would be nice to include an identifier of the context classloader
// that this LogFactoryImpl object is responsible for. However that
// isn't possible as that information isn't available. It is possible
// to figure this out by looking at the logging from LogFactory to
// see the context & impl ids from when this object was instantiated,
// in order to link the impl id output as this object's prefix back to
// the context it is intended to manage.
// Note that this prefix should be kept consistent with that
// in LogFactory.
final Class clazz = this.getClass();
final ClassLoader classLoader = getClassLoader(clazz);
String classLoaderName;
try {
if (classLoader == null) {
classLoaderName = "BOOTLOADER";
} else {
classLoaderName = objectId(classLoader);
}
} catch (final SecurityException e) {
classLoaderName = "UNKNOWN";
}
diagnosticPrefix = "[LogFactoryImpl@" + System.identityHashCode(this) + " from " + classLoaderName + "] ";
}