Kotlin / kotlinx-kover

Apache License 2.0
1.25k stars 46 forks source link

koverPrintCoverage does not work when org.gradle.logging.level=warn #557

Closed mgroth0 closed 1 month ago

mgroth0 commented 2 months ago

Describe the bug

When org.gradle.logging.level=warn, koverPrintCoverage does not produce any output.

Expected behavior

org.gradle.logging.level is used to control logging. Logging is a passive way to keep information on problems, errors, and just general information of a process. When org.gradle.logging.level=warn, we are saying that we only want warnings; we only want actionable information kept.

koverPrintCoverage is not passive logging. It is an optional task that is triggered manually when we want to see coverage information. It should not require that we set org.gradle.logging.level=lifecycle. Unlike all of the other information that is printed at the lifecycle log level, koverPrintCoverage is information that we have manually triggered to see.

Compare koverPrintCoverage with tasks. If org.gradle.logging.level=warn and we run ./gradlew tasks, we still see the printed output from the tasks task. koverPrintCoverage should work the same way.

shanshin commented 1 month ago

Fixed in 0.8.0-Beta2

mgroth0 commented 1 month ago

It works. Thank you!