[slf4j-user] Forcing SLF4J-Test to be used

Robert Elliot rob at lidalia.org.uk
Tue Oct 25 22:27:39 UTC 2016


You could look into modifying grade’s test classpath; something like:

configurations.testRuntime.exclude(group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl')


> On 25 Oct 2016, at 23:11, Mike Mills <mike at themills.id.au> wrote:
> 
> I am trying to use a gradle build to use log4j2 as the runtime implementation and slf4j-test as the test configuration.
> 
> In a standard gradle build this means that both the log4j2 and slf4j-test StaticLoggerBinders end up on the classpath during tests and there is no guarantee that the slf4j-test jars are used. (The build works on my windows machine but fails on the Solaris/Jenkins).
> 
> Is there a way to force slf4j to choose the slf4j-test library? 
> 
> Alternatively, would it make sense to modify slf4j to ALWAYS use the slf4j-test library if it is on the classpath?
> 
> Cheers for any suggestions.
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20161025/d8d42d8e/attachment.html>


More information about the slf4j-user mailing list