From a17f298fd047e6dac9f08f9210e1c286797971f7 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Wed, 14 Sep 2022 18:39:16 +0200 Subject: [PATCH] added a new tests case, bump to SLF4J 2.0.1, remove property latest.stable.version in pom.xml Signed-off-by: Ceki Gulcu --- .../src/test/java/ch/qos/logback/classic/LoggerTest.java | 9 +++++++++ pom.xml | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/LoggerTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/LoggerTest.java index 4b016cbd4e..be1adcc5c7 100644 --- a/logback-classic/src/test/java/ch/qos/logback/classic/LoggerTest.java +++ b/logback-classic/src/test/java/ch/qos/logback/classic/LoggerTest.java @@ -27,6 +27,8 @@ import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.read.ListAppender; import ch.qos.logback.core.status.Status; +import org.slf4j.spi.LoggingEventBuilder; +import org.slf4j.spi.NOPLoggingEventBuilder; public class LoggerTest { @@ -162,6 +164,13 @@ public void testEnabled_All() throws Exception { checkLevelThreshold(loggerTest, Level.ALL); } + @Test + public void fluentAPIAtDisabledDebugLevelShouldReturnNOPLoggingEventBuilder() throws Exception { + root.setLevel(Level.INFO); + LoggingEventBuilder leb = loggerTest.atLevel(org.slf4j.event.Level.DEBUG); + assertEquals(NOPLoggingEventBuilder.class, leb.getClass()); + } + @Test public void testEnabled_Debug() throws Exception { root.setLevel(Level.DEBUG); diff --git a/pom.xml b/pom.xml index cfaf6da1e3..917b200787 100755 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,6 @@ 2022-08-28T17:20:00Z - 1.2.11 11 ${jdk.version} UTF-8 @@ -63,7 +62,7 @@ - 2.0.0 + 2.0.1 0.8.1 1.1.0 10.0.10