Does anyone know how to configure loglevel when intellij runs a junit test from gradle? It seems to jump to debug for all and I don't see any place to configure it. The debug output is way too verbose for me.
Thanks
Peter
Does anyone know how to configure loglevel when intellij runs a junit test from gradle? It seems to jump to debug for all and I don't see any place to configure it. The debug output is way too verbose for me.
Thanks
Peter
Logging for tests must be configured properly or we go to default unconfigured which is LOG EVERYTHING. At least, that's my theory.
Below we just force all logging to info. Ideally, I want org.apache.* @ info and my classes at debug but I'll that requires me learning logback.xml format (which comes next)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d %5p | %t | %-55logger{55} | %m %n</pattern>
</encoder>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="CONSOLE"/>
</root>
</configuration>
You need to configure the logging framework(s) used by the code under test, e.g. by placing a configuration file into src/test/resources
. How exactly this is done depends on which logging framework is used.
PS: Unless this is about Android Studio, Gradle is not involved when running a unit test from IntelliJ.