From 3e25d99f4ea50ea897569dfb13a0f053ee5cae92 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 21 Dec 2015 09:13:58 +0100 Subject: [PATCH] Add test to validate `log42-spring.xml` location See gh-4809 --- .../boot/logging/log4j2/Log4J2LoggingSystemTests.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java b/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java index fb0aa0e566..5936f06c6c 100644 --- a/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java @@ -191,6 +191,13 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests { "log4j2.jsn", "log4j2.xml"))); } + @Test + public void springConfigLocations() throws Exception { + String[] locations = getSpringConfigLocations(this.loggingSystem); + assertThat(locations, + equalTo(new String[] { "log4j2-spring.xml" })); + } + @Test public void exceptionsIncludeClassPackaging() throws Exception { this.loggingSystem.beforeInitialize();