Skip to content

Instantly share code, notes, and snippets.

@vorburger
Created January 12, 2017 12:04
Show Gist options
  • Select an option

  • Save vorburger/b3ef1026f55309fcb42df963cde4df5f to your computer and use it in GitHub Desktop.

Select an option

Save vorburger/b3ef1026f55309fcb42df963cde4df5f to your computer and use it in GitHub Desktop.
Find all org/slf4j/Logger available on the classpath
public class FindAllSlf4jLoggersOnClasspathTest {
@Test
public void testSlf4jMess() throws IOException {
Enumeration<URL> urls = getClass().getClassLoader().getResources("org/slf4j/Logger.class");
while (urls.hasMoreElements()) {
URL url = urls.nextElement();
System.out.println(url);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment