statusListenerIsUpdatedUponReinitialization() — spring-boot Function Reference
Architecture documentation for the statusListenerIsUpdatedUponReinitialization() function in Log4J2LoggingSystemTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 3d866e6b_6822_dcc7_1062_6090c111fd29["statusListenerIsUpdatedUponReinitialization()"] bffa5cc2_2336_d219_9e81_a81a831f09b1["initialize()"] 3d866e6b_6822_dcc7_1062_6090c111fd29 -->|calls| bffa5cc2_2336_d219_9e81_a81a831f09b1 8a226655_54d5_897b_52c3_90c04e1db20c["cleanUp()"] 3d866e6b_6822_dcc7_1062_6090c111fd29 -->|calls| 8a226655_54d5_897b_52c3_90c04e1db20c 501f40c7_eea3_8197_664f_2a7d4a9c3264["beforeInitialize()"] 3d866e6b_6822_dcc7_1062_6090c111fd29 -->|calls| 501f40c7_eea3_8197_664f_2a7d4a9c3264 style 3d866e6b_6822_dcc7_1062_6090c111fd29 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java lines 494–517
@Test
void statusListenerIsUpdatedUponReinitialization() {
this.loggingSystem.beforeInitialize();
this.loggingSystem.initialize(this.initializationContext, null, null);
// listener should be registered
LoggerContext loggerContext = this.loggingSystem.getLoggerContext();
StatusListener statusListener = (StatusListener) loggerContext
.getObject(Log4J2LoggingSystem.STATUS_LISTENER_KEY);
assertThat(statusListener).isNotNull();
assertThat(StatusLogger.getLogger().getListeners()).contains(statusListener);
this.loggingSystem.cleanUp();
// listener should be removed from context and StatusLogger
assertThat(StatusLogger.getLogger().getListeners()).doesNotContain(statusListener);
assertThat(loggerContext.getObject(Log4J2LoggingSystem.STATUS_LISTENER_KEY)).isNull();
// a new listener should be registered
this.loggingSystem.beforeInitialize();
this.loggingSystem.initialize(this.initializationContext, null, null);
StatusListener statusListener1 = (StatusListener) loggerContext
.getObject(Log4J2LoggingSystem.STATUS_LISTENER_KEY);
assertThat(statusListener1).isNotNull();
assertThat(StatusLogger.getLogger().getListeners()).contains(statusListener1);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does statusListenerIsUpdatedUponReinitialization() do?
statusListenerIsUpdatedUponReinitialization() is a function in the spring-boot codebase.
What does statusListenerIsUpdatedUponReinitialization() call?
statusListenerIsUpdatedUponReinitialization() calls 3 function(s): beforeInitialize, cleanUp, initialize.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free