Factory Class — spring-boot Architecture
Architecture documentation for the Factory class in Log4J2LoggingSystem.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java lines 520–540
@Order(0)
public static class Factory implements LoggingSystemFactory {
static final String LOG4J_CORE_CONTEXT_FACTORY = "org.apache.logging.log4j.core.impl.Log4jContextFactory";
private static final boolean PRESENT = ClassUtils.isPresent(LOG4J_CORE_CONTEXT_FACTORY,
Factory.class.getClassLoader());
@Override
public @Nullable LoggingSystem getLoggingSystem(ClassLoader classLoader) {
if (PRESENT) {
org.apache.logging.log4j.spi.LoggerContext spiLoggerContext = LogManager.getContext(classLoader, false);
Assert.state(spiLoggerContext instanceof LoggerContext, "");
if (spiLoggerContext instanceof LoggerContext coreLoggerContext) {
return new Log4J2LoggingSystem(classLoader, coreLoggerContext);
}
}
return null;
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free