With 2.3.1.RELEASE
:
./gradlew bootBuildImage --verboseLogging=true
Results in:
Unknown command-line option '--verboseLogging'
Seems this should work: https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/gradle-plugin/reference/html/#build-image-customization
Comment From: jamesward
Oh, actually it looks like that isn't exposed as a command line param.
Comment From: jamesward
BTW, it would be nice to have a sample for this cause it took some figuring:
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
tasks.getByName<BootBuildImage>("bootBuildImage") {
isVerboseLogging = true
}
Comment From: snicoll
@jamesward there is an example right below the section you've referenced. Granted, it's using builder
rather than verboseLogging
but that should cover it. Have I missed something?
Comment From: jamesward
I had to figure out the import
and that it needs to be isVerboseLogging
instead of verboseLogging
. So not just a copy & paste :)
Comment From: wilkinsona
The Gradle Plugin documentation's section on building OCI images hopefully helps with the import. It contains a link to the javadoc for BootBuildImage
.
The need for the is
prefix is a quirk of Kotlin. With the Groovy DSL the more intuitive verboseLogging = true
will work.