Skip to content

Commit

Permalink
added a new tests case, bump to SLF4J 2.0.1, remove property latest.s…
Browse files Browse the repository at this point in the history
…table.version in pom.xml

Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Sep 14, 2022
1 parent 32a3172 commit a17f298
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<properties>
<!-- yyyy-MM-dd'T'HH:mm:ss'Z' -->
<project.build.outputTimestamp>2022-08-28T17:20:00Z</project.build.outputTimestamp>
<latest.stable.version>1.2.11</latest.stable.version>
<jdk.version>11</jdk.version>
<maven.compiler.release>${jdk.version}</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -63,7 +62,7 @@
<!-- slf4j.version property is used below, in
logback-classic/pom.xml, /logback-examples/src/main/resources/setClasspath.cmd, download.html
-->
<slf4j.version>2.0.0</slf4j.version>
<slf4j.version>2.0.1</slf4j.version>
<cal10n.version>0.8.1</cal10n.version>
<consolePlugin.version>1.1.0</consolePlugin.version>
<tomcat.version>10.0.10</tomcat.version>
Expand Down

0 comments on commit a17f298

Please sign in to comment.