Clone
Daz DeBoer
committed
on 03 Oct 18
Merge PR #6979: Allow tested code to reference SLF4J when gradle types are not available on the classpath
The core `Slf4jLoggingConfigurer` … Show more
Merge PR #6979: Allow tested code to reference SLF4J when gradle types are not available on the classpath

The core `Slf4jLoggingConfigurer` assumes that the Gradle implementation

of `org.slf4j.ILoggerFactory` is being used. This is not the case when

tests are run using a custom system classloader (by setting the

`java.system.class.loader` system property), or when the tests are executed with modular java.

Previously, this would result in a `ClassCastException` when attempting

to configure the logger. This change makes `Slf4jLoggingConfigurer` lenient

in this case, opting not to configure the underlying logger rather than

fail.

Fixes #2657 Show less

green-master + 403 more