diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/spi/InvocationTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/spi/InvocationTest.java index 0ae721ed6d..c4da6d3f82 100644 --- a/logback-classic/src/test/java/ch/qos/logback/classic/spi/InvocationTest.java +++ b/logback-classic/src/test/java/ch/qos/logback/classic/spi/InvocationTest.java @@ -13,6 +13,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.slf4j.helpers.Reporter.SLF4J_INTERNAL_VERBOSITY_KEY; public class InvocationTest { @@ -20,10 +21,11 @@ public class InvocationTest { final String loggerName = this.getClass().getName(); StringPrintStream sps = new StringPrintStream(oldErr, true); - String CONNECTED_WITH_MESSAGE = "SLF4J(I): Connected with provider of type [ch.qos.logback.classic.spi.LogbackServiceProvider]"; + String CONNECTED_WITH_MESSAGE = "SLF4J(D): Connected with provider of type [ch.qos.logback.classic.spi.LogbackServiceProvider]"; @BeforeEach public void setUp() throws Exception { + System.setProperty(SLF4J_INTERNAL_VERBOSITY_KEY, "debug"); System.setErr(sps); } @@ -31,6 +33,7 @@ public void setUp() throws Exception { public void tearDown() throws Exception { LoggerFactoryFriend.reset(); System.setErr(oldErr); + System.clearProperty(SLF4J_INTERNAL_VERBOSITY_KEY); } // https://jira.qos.ch/browse/LOGBACK-1568 would have been prevented