ci.gradle
ci.gradle copied to clipboard
Propagate logging level from dev mode to child tasks
The default logging level in Gradle is LIFECYCLE. In dev mode, if you run gradle libertyDev -i, it will log dev mode messages using INFO, but child tasks (such as installFeature) are still logged using LIFECYCLE. It would be useful to propagate the logging level to child tasks as well.
For example, if you run gradle installFeature -i directly, it shows output such as
> Task :installFeature
Caching disabled for task ':installFeature' because:
Build cache is disabled
Task ':installFeature' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Cached resource https://repo.maven.apache.org/maven2/io/openliberty/features/install-map/maven-metadata.xml is up-to-date (lastModified: Thu Jul 26 10:56:21 EDT 2018).
Installing features: [mpconfig-1.3, cdi-2.0, jsonp-1.1, mpmetrics-2.0, jaxrs-2.1]
Cached resource https://repo.maven.apache.org/maven2/io/openliberty/features/repository-resolver/maven-metadata.xml is up-to-date (lastModified: Thu Jul 26 10:57:36 EDT 2018).
Product validation completed successfully.
The following features have been installed: mpConfig-1.3 cdi-2.0 jsonp-1.1 servlet-4.0 ssl-1.0 jndi-1.0 distributedMap-1.0 json-1.0 mpMetrics-2.0 jaxrsClient-2.1 jaxrs-2.1
:installFeature (Thread[Execution worker for ':' Thread 9,5,main]) completed. Took 9.472 secs.
But if you run gradle libertyDev -i and it installs features from a child task, it does not show the above but only shows
> Task :installFeature
This applies to running the generateFeatures task from dev mode as well
Added code to propagate --debug but not all logging levels in #721.