|
|
@ -162,6 +162,18 @@ public class LoggingApplicationListenerTests {
|
|
|
|
assertThat(new File(tmpDir() + "/spring.log").exists()).isFalse();
|
|
|
|
assertThat(new File(tmpDir() + "/spring.log").exists()).isFalse();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
public void tomcatNopLoggingConfigDoesNotCauseAFailure() throws Exception {
|
|
|
|
|
|
|
|
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context,
|
|
|
|
|
|
|
|
"logging.config: -Dnop");
|
|
|
|
|
|
|
|
this.initializer.initialize(this.context.getEnvironment(),
|
|
|
|
|
|
|
|
this.context.getClassLoader());
|
|
|
|
|
|
|
|
this.logger.info("Hello world");
|
|
|
|
|
|
|
|
String output = this.outputCapture.toString().trim();
|
|
|
|
|
|
|
|
assertThat(output).contains("Hello world").doesNotContain("???");
|
|
|
|
|
|
|
|
assertThat(new File(tmpDir() + "/spring.log").exists()).isFalse();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void overrideConfigBroken() throws Exception {
|
|
|
|
public void overrideConfigBroken() throws Exception {
|
|
|
|
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context,
|
|
|
|
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context,
|
|
|
|