Skip to content

Commit 8935470

Browse files
committed
adapt test to SLF4J version 2.0.16
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent cb60369 commit 8935470

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

logback-classic/src/test/java/ch/qos/logback/classic/spi/InvocationTest.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,27 @@
1313

1414
import static org.junit.jupiter.api.Assertions.assertEquals;
1515
import static org.junit.jupiter.api.Assertions.assertTrue;
16+
import static org.slf4j.helpers.Reporter.SLF4J_INTERNAL_VERBOSITY_KEY;
1617

1718
public class InvocationTest {
1819

1920
private final PrintStream oldErr = System.err;
2021
final String loggerName = this.getClass().getName();
2122
StringPrintStream sps = new StringPrintStream(oldErr, true);
2223

23-
String CONNECTED_WITH_MESSAGE = "SLF4J(I): Connected with provider of type [ch.qos.logback.classic.spi.LogbackServiceProvider]";
24+
String CONNECTED_WITH_MESSAGE = "SLF4J(D): Connected with provider of type [ch.qos.logback.classic.spi.LogbackServiceProvider]";
2425

2526
@BeforeEach
2627
public void setUp() throws Exception {
28+
System.setProperty(SLF4J_INTERNAL_VERBOSITY_KEY, "debug");
2729
System.setErr(sps);
2830
}
2931

3032
@AfterEach
3133
public void tearDown() throws Exception {
3234
LoggerFactoryFriend.reset();
3335
System.setErr(oldErr);
36+
System.clearProperty(SLF4J_INTERNAL_VERBOSITY_KEY);
3437
}
3538

3639
// https://jira.qos.ch/browse/LOGBACK-1568 would have been prevented

0 commit comments

Comments
 (0)