Skip to content

Commit a17f298

Browse files
committed
added a new tests case, bump to SLF4J 2.0.1, remove property latest.stable.version in pom.xml
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent 32a3172 commit a17f298

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

logback-classic/src/test/java/ch/qos/logback/classic/LoggerTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import ch.qos.logback.classic.spi.ILoggingEvent;
2828
import ch.qos.logback.core.read.ListAppender;
2929
import ch.qos.logback.core.status.Status;
30+
import org.slf4j.spi.LoggingEventBuilder;
31+
import org.slf4j.spi.NOPLoggingEventBuilder;
3032

3133
public class LoggerTest {
3234

@@ -162,6 +164,13 @@ public void testEnabled_All() throws Exception {
162164
checkLevelThreshold(loggerTest, Level.ALL);
163165
}
164166

167+
@Test
168+
public void fluentAPIAtDisabledDebugLevelShouldReturnNOPLoggingEventBuilder() throws Exception {
169+
root.setLevel(Level.INFO);
170+
LoggingEventBuilder leb = loggerTest.atLevel(org.slf4j.event.Level.DEBUG);
171+
assertEquals(NOPLoggingEventBuilder.class, leb.getClass());
172+
}
173+
165174
@Test
166175
public void testEnabled_Debug() throws Exception {
167176
root.setLevel(Level.DEBUG);

pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
<properties>
4949
<!-- yyyy-MM-dd'T'HH:mm:ss'Z' -->
5050
<project.build.outputTimestamp>2022-08-28T17:20:00Z</project.build.outputTimestamp>
51-
<latest.stable.version>1.2.11</latest.stable.version>
5251
<jdk.version>11</jdk.version>
5352
<maven.compiler.release>${jdk.version}</maven.compiler.release>
5453
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -63,7 +62,7 @@
6362
<!-- slf4j.version property is used below, in
6463
logback-classic/pom.xml, /logback-examples/src/main/resources/setClasspath.cmd, download.html
6564
-->
66-
<slf4j.version>2.0.0</slf4j.version>
65+
<slf4j.version>2.0.1</slf4j.version>
6766
<cal10n.version>0.8.1</cal10n.version>
6867
<consolePlugin.version>1.1.0</consolePlugin.version>
6968
<tomcat.version>10.0.10</tomcat.version>

0 commit comments

Comments
 (0)