Setting logging level with Gradle 2.0

I have seen similar question asked way on Gradle 1.4, but I am wondering whether things have changed. I am in the situation where test are invoking network traffic. Everything is being logged at DEBUG level, and something like org.apache.http.wire is added huge amounts to output.

I am a bit confused as to how to do this in later versions of Gradle (1.12 / 2.0)

  • Do I need to set up a logging.properties file for java.util.logging or log4j? - If I create it in src/test/resources will it be used automatically or do I need to set java.util.logging.config.file in test { systemProperties } ?

Frankly a little practical example on just silencing org.apache.http.wire will do me fine.

I’ll answer this one myself as I have managed to fix it.

If you are interested see https://gist.github.com/ysb33r/68ba7ad1279d0492086a

You’ll have to configure your logging framework of choice as needed. Typically this is done by placing a configuration file in ‘src/test/resources’.