File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
core/spring-boot/src/test/java/org/springframework/boot/logging/log4j2 Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 3737import org .apache .logging .log4j .core .LoggerContext ;
3838import org .apache .logging .log4j .core .config .Configuration ;
3939import org .apache .logging .log4j .core .config .LoggerConfig ;
40- import org .apache .logging .log4j .core .config .Reconfigurable ;
4140import org .apache .logging .log4j .core .config .composite .CompositeConfiguration ;
4241import org .apache .logging .log4j .core .config .plugins .util .PluginRegistry ;
4342import org .apache .logging .log4j .core .config .xml .XmlConfiguration ;
@@ -114,16 +113,8 @@ void setup(TestInfo testInfo) {
114113
115114 @ AfterEach
116115 void cleanUp () {
116+ this .loggingSystem .getConfiguration ().stop ();
117117 this .loggingSystem .cleanUp ();
118- LoggerContext loggerContext = (LoggerContext ) LogManager .getContext (false );
119- Configuration configuration = loggerContext .getConfiguration ();
120- loggerContext .stop ();
121- if (configuration instanceof Reconfigurable reconfigurable ) {
122- loggerContext .start (reconfigurable .reconfigure ());
123- }
124- else {
125- loggerContext .start (configuration );
126- }
127118 PluginRegistry .getInstance ().clear ();
128119 }
129120
You can’t perform that action at this time.
0 commit comments