Is it possible to have gradle read a logging.properties file in order to set logging levels by class? What I want to do is to see my debug statements, but not the debug statements for every class being used. I.e., I'd like to use -Djava.util.logging.config.file=mylogging.properties
.
This topic on the gradle forum refers to the class that hijacks the ConsoleHandler but I wasn't sure if the same thing applies for non-testing tasks.
Server Configuration File You can change the log level through a Windows Registry file or a Linux configuration file. Add the logLevel string, and set the desired value (e.g., DEBUG). Click OK to save.
View -> Tool Windows -> Build. There is small "ab" button on the left panel. All gradle logs for current build are there.
System properties Using the -D command-line option, you can pass a system property to the JVM which runs Gradle. The -D option of the gradle command has the same effect as the -D option of the java command. You can also set system properties in gradle. properties files with the prefix systemProp.
Some of them are important, others less important, while others are meta-considerations. The standard ranking of logging levels is as follows: ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF.
Add this line to gradle.properties
org.gradle.logging.level=info
will have the same effect as gradle --info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With