TestLog4J2LoggingSystem Class — spring-boot Architecture
Architecture documentation for the TestLog4J2LoggingSystem class in TestLog4J2LoggingSystem.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/TestLog4J2LoggingSystem.java lines 23–46
class TestLog4J2LoggingSystem extends Log4J2LoggingSystem {
private boolean disableSelfInitialization;
TestLog4J2LoggingSystem(String contextName) {
// Tests add resources to the thread context classloader
super(Thread.currentThread().getContextClassLoader(), new LoggerContext(contextName));
getLoggerContext().start();
}
Configuration getConfiguration() {
return getLoggerContext().getConfiguration();
}
@Override
protected @Nullable String getSelfInitializationConfig() {
return this.disableSelfInitialization ? null : super.getSelfInitializationConfig();
}
void disableSelfInitialization() {
this.disableSelfInitialization = true;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free