Skip to content

Commit

Permalink
Removed message to stderr when using provider from system property.
Browse files Browse the repository at this point in the history
Resolves qos-ch#361.

Signed-off-by: Garret Wilson <garret@globalmentor.com>
  • Loading branch information
garretwilson committed Nov 7, 2023
1 parent 7c164fa commit 5fd5eac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ static SLF4JServiceProvider loadExplicitlySpecified(ClassLoader classLoader) {
return null;
}
try {
String message = String.format("Attempting to load provider \"%s\" specified via \"%s\" system property", explicitlySpecified, PROVIDER_PROPERTY_KEY);
Util.report(message);
Class<?> clazz = classLoader.loadClass(explicitlySpecified);
Constructor<?> constructor = clazz.getConstructor();
Object provider = constructor.newInstance();
Expand Down
4 changes: 0 additions & 4 deletions slf4j-api/src/test/java/org/slf4j/LoggerFactoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ public void testExplicitlySpecified() {
System.setProperty(LoggerFactory.PROVIDER_PROPERTY_KEY, "org.slf4j.LoggerFactoryTest$TestingProvider");
SLF4JServiceProvider provider = LoggerFactory.loadExplicitlySpecified(classLoaderOfLoggerFactory);
assertTrue("provider should be instance of TestingProvider class", provider instanceof TestingProvider);
assertTrue(mockedSyserr.toString().contains(" Attempting to load provider \"org.slf4j.LoggerFactoryTest$TestingProvider\" specified via \"slf4j.provider\" system property"));
System.out.println(mockedSyserr.toString());


}

@Test
Expand Down

0 comments on commit 5fd5eac

Please sign in to comment.