Skip to content

Commit 281f4d4

Browse files
committed
Clear system property set by log file registration
Closes gh-20790
1 parent 5c879b2 commit 281f4d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/logging/LoggingApplicationListenerIntegrationTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.springframework.boot.context.event.ApplicationStartingEvent;
3131
import org.springframework.boot.logging.LogFile;
3232
import org.springframework.boot.logging.LoggingSystem;
33+
import org.springframework.boot.logging.LoggingSystemProperties;
3334
import org.springframework.boot.testsupport.system.CapturedOutput;
3435
import org.springframework.boot.testsupport.system.OutputCaptureExtension;
3536
import org.springframework.context.ApplicationListener;
@@ -64,6 +65,9 @@ void logFileRegisteredInTheContextWhenApplicable(@TempDir File tempDir) throws E
6465
assertThat(service.logFile).isNotNull();
6566
assertThat(service.logFile.toString()).isEqualTo(logFile);
6667
}
68+
finally {
69+
System.clearProperty(LoggingSystemProperties.LOG_FILE);
70+
}
6771
}
6872

6973
@Test

0 commit comments

Comments
 (0)