I'm writing a flyway wrapper plugin for gradle. Flyway already uses log4j for it's message logging.
On the info level all the output is relevant to the user.
When I add the custom plugin to new project and run one of its tasks than nothing is displayed in the output. I have to run gradle flywayStatus
--info to see the messages.
Is there a way to change the log4j settings in the plugin so that the log level does not need to be modified in the projects that use the plugin?
Any idea would really be appreciated.
Thanks, Gerwin
View -> Tool Windows -> Build. There is small "ab" button on the left panel. All gradle logs for current build are there.
There are two general types of plugins in Gradle, binary plugins and script plugins.
buildscript: This block is used to configure the repositories and dependencies for Gradle. Note: Don't include dependencies here. ( those will be included in the module-level build.gradle) dependencies: This block in buildscript is used to configure dependencies that the Gradle needs to build during the project. Java.
projectDir File The directory containing the build script. The value is read-only. buildDir File The directory with the build name in the directory, containing the build script. rootDir File The directory of the project at the root of a project structure.
You can get access to the LoggingManager for the task by calling its getLogging() method.
You can set the logging level on the Manager.
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