File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
logback-classic/src/test/java/ch/qos/logback/classic Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2727import ch .qos .logback .classic .spi .ILoggingEvent ;
2828import ch .qos .logback .core .read .ListAppender ;
2929import ch .qos .logback .core .status .Status ;
30+ import org .slf4j .spi .LoggingEventBuilder ;
31+ import org .slf4j .spi .NOPLoggingEventBuilder ;
3032
3133public 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 );
Original file line number Diff line number Diff line change 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>
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>
You can’t perform that action at this time.
0 commit comments