From 06fb2d6d3e74a1304429f533c1f46bf3f174d641 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 25 Feb 2016 20:17:32 +0000 Subject: [PATCH] Upgrade to Log4j2 2.5 Closes gh-5242 --- spring-boot-dependencies/pom.xml | 2 +- .../boot/logging/log4j2/Log4J2LoggingSystemTests.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index 88ecf2913e..8b63c3306e 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -110,7 +110,7 @@ 1.3.1 4.12 3.4.2 - 2.4.1 + 2.5 1.1.5 1.16.6 1.3.4 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 5c06cc9b8e..0ae70b2c81 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 @@ -26,7 +26,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.core.config.Configuration; -import org.apache.logging.log4j.core.config.FileConfigurationMonitor; import org.hamcrest.Matcher; import org.hamcrest.Matchers; import org.junit.Before; @@ -104,10 +103,7 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests { assertThat(new File(tmpDir() + "/tmp.log").exists()).isFalse(); assertThat(configuration.getConfigurationSource().getFile().getAbsolutePath()) .contains("log4j2-nondefault.xml"); - // we assume that "log4j2-nondefault.xml" contains the 'monitorInterval' - // attribute, so we check that a monitor is created - assertThat(configuration.getConfigurationMonitor()) - .isInstanceOf(FileConfigurationMonitor.class); + assertThat(configuration.getWatchManager().getIntervalSeconds()).isEqualTo(30); } @Test(expected = IllegalStateException.class)