I call ant.signjar from a gradle script. How can I capture its output? I did neither get it managed easily to elevate the output from INFO to another level, nor to intercept or wrap the output to error warnings out to WARN level. Currently the signjar echoes out that the certificate will expire soon, but this is not shown on WARN level which is not so nice.
I assume the Ant task is using Ant's logging framework, and not just printing to standard out. In that case, have you tried the following?
task taskThatCallsAntTask {
logging.level = LogLevel.INFO
}
When configured in this way, the log level will be changed to INFO while the task is executing (and reverted back afterwards), no matter which log level is set when invoking Gradle. Note that you can't elevate the log level of an Ant log event; it's up to the Ant task at which level it logs.
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