diff --git a/integration/src/test/java/org/slf4j/CompatibilityAssertionTest.java b/integration/src/test/java/org/slf4j/CompatibilityAssertionTest.java
index 59855a7a2..9ccd69fa0 100644
--- a/integration/src/test/java/org/slf4j/CompatibilityAssertionTest.java
+++ b/integration/src/test/java/org/slf4j/CompatibilityAssertionTest.java
@@ -27,6 +27,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import static org.slf4j.helpers.Reporter.SLF4J_INTERNAL_VERBOSITY_KEY;
import java.io.PrintStream;
import java.util.Random;
@@ -43,11 +44,13 @@ public class CompatibilityAssertionTest {
@Before
public void setUp() throws Exception {
+ System.setProperty(SLF4J_INTERNAL_VERBOSITY_KEY, "debug");
System.setErr(sps);
}
@After
public void tearDown() throws Exception {
+ System.clearProperty(SLF4J_INTERNAL_VERBOSITY_KEY);
System.setErr(old);
}
@@ -59,7 +62,7 @@ public void test() throws Exception {
assertEquals(2, sps.stringList.size());
String s0 = (String) sps.stringList.get(0);
- assertTrue(s0.startsWith("SLF4J(I): Connected with provider of type [org.slf4j.simple.SimpleServiceProvider]"));
+ assertTrue(s0.startsWith("SLF4J(D): Connected with provider of type [org.slf4j.simple.SimpleServiceProvider]"));
String s1 = (String) sps.stringList.get(1);
assertTrue(s1.contains(msg));
diff --git a/integration/src/test/java/org/slf4j/MultiBindingAssertionTest.java b/integration/src/test/java/org/slf4j/MultiBindingAssertionTest.java
index cec7940fc..2eb3c7689 100644
--- a/integration/src/test/java/org/slf4j/MultiBindingAssertionTest.java
+++ b/integration/src/test/java/org/slf4j/MultiBindingAssertionTest.java
@@ -55,11 +55,13 @@ public void test() throws Exception {
String msg = "hello world " + diff;
logger.info(msg);
List
- * Internal reporting is performed by calling the {@link #info(String)}, {@link #warn(String)} (String)}
- * {@link #error(String)} (String)} and {@link #error(String, Throwable)} methods.
+ * Internal reporting is performed by calling the {@link #debug(String)}, {@link #info(String)},
+ * {@link #warn(String)} (String)} {@link #error(String)} (String)} and
+ * {@link #error(String, Throwable)} methods.
* See {@link #SLF4J_INTERNAL_VERBOSITY_KEY} and {@link #SLF4J_INTERNAL_REPORT_STREAM_KEY} for
* configuration options. Messages of level DEBUG are be enabled when the {@link #SLF4J_INTERNAL_VERBOSITY_KEY}
+ * system property is set to "DEBUG" and disabled when set to "INFO", "WARN" or "ERROR". By default,
+ * {@link #SLF4J_INTERNAL_VERBOSITY_KEY} is set to "INFO". Messages of level INFO are be enabled when the {@link #SLF4J_INTERNAL_VERBOSITY_KEY} system property is
- * set to "INFO" and disabled when set to "WARN" or "ERROR". By default, {@link #SLF4J_INTERNAL_VERBOSITY_KEY} is
- * set to "INFO".
Messages of level WARN are be enabled when the {@link #SLF4J_INTERNAL_VERBOSITY_KEY} system property is - * set to "INFO" or "WARN" and disabled when set to "ERROR". By default, {@link #SLF4J_INTERNAL_VERBOSITY_KEY} is - * set to "INFO".
+ * set to "DEBUG", "INFO" or "WARN" and disabled when set to "ERROR". By default, + * {@link #SLF4J_INTERNAL_VERBOSITY_KEY} is set to "INFO". * * @param msg the message text */ @@ -147,7 +172,6 @@ static final public void warn(String msg) { } } - /** * Report an internal message of level "ERROR accompanied by a {@link Throwable}. * Message text is prefixed with the string "SLF4J(E)", with (E) standing as a shorthand for ERROR. @@ -164,10 +188,9 @@ static final public void error(String msg, Throwable t) { t.printStackTrace(getTarget()); } - /** - * Report an internal message of level "ERROR". Message text is prefixed with the string "SLF4J(E)", with - * (E) standing as a shorthand for ERROR. + * Report an internal message of level "ERROR". Message text is prefixed with the string "SLF4J(E)", + * with (E) standing as a shorthand for ERROR. * *Messages of level ERROR are always enabled. * diff --git a/slf4j-jdk-platform-logging/src/test/java/org/slf4j/jdk/platform/logging/test/SLF4JPlatformLoggingTest.java b/slf4j-jdk-platform-logging/src/test/java/org/slf4j/jdk/platform/logging/test/SLF4JPlatformLoggingTest.java index b2f62ddd7..8778fd2fa 100644 --- a/slf4j-jdk-platform-logging/src/test/java/org/slf4j/jdk/platform/logging/test/SLF4JPlatformLoggingTest.java +++ b/slf4j-jdk-platform-logging/src/test/java/org/slf4j/jdk/platform/logging/test/SLF4JPlatformLoggingTest.java @@ -110,11 +110,12 @@ public void throwTest() throws IOException { //java.lang.Exception // at org.slf4j.jdk.platform.logging/org.slf4j.jdk.platform.logging.SLF4JPlatformLoggingTest.throwTest(SLF4JPlatformLoggingTest.java:92) - assertTrue(results.get(0).startsWith("SLF4J(I): Connected with provider of type [")); - assertEquals("INFO throwTest - we have a problem", results.get(1)); - assertEquals(Exception.class.getName(), results.get(2)); - assertTrue(results.get(3).contains("at ")); - assertTrue(results.get(3).contains(this.getClass().getName())); + int line = 0; + //assertTrue(results.get(0).startsWith("SLF4J(I): Connected with provider of type [")); + assertEquals("INFO throwTest - we have a problem", results.get(line++)); + assertEquals(Exception.class.getName(), results.get(line++)); + assertTrue(results.get(line).contains("at ")); + assertTrue(results.get(line++).contains(this.getClass().getName())); } diff --git a/slf4j-nop/src/test/java/org/slf4j/nop/MultithreadedInitializationTest.java b/slf4j-nop/src/test/java/org/slf4j/nop/MultithreadedInitializationTest.java index e1c7398ec..dabef97c3 100755 --- a/slf4j-nop/src/test/java/org/slf4j/nop/MultithreadedInitializationTest.java +++ b/slf4j-nop/src/test/java/org/slf4j/nop/MultithreadedInitializationTest.java @@ -25,6 +25,7 @@ package org.slf4j.nop; import static org.junit.Assert.assertEquals; +import static org.slf4j.helpers.Reporter.SLF4J_INTERNAL_VERBOSITY_KEY; import java.io.PrintStream; import java.util.ArrayList; @@ -58,12 +59,14 @@ public class MultithreadedInitializationTest { @Before public void setup() { + System.setProperty(SLF4J_INTERNAL_VERBOSITY_KEY, "debug"); LoggerFactoryFriend.reset(); System.setErr(sps); } @After public void tearDown() throws Exception { + System.clearProperty(SLF4J_INTERNAL_VERBOSITY_KEY); LoggerFactoryFriend.reset(); System.setErr(oldErr); }