Elasticsearch version: 6.2.1
Plugins installed: None
JVM version: 1.8.0
OS version: MacOS 10.13
I am trying to print standard streams System.out.print()
when testing a bug fix. I found here that I can just add the following code to my build.gradle file in order to show standard streams:
apply plugin: 'java'
test {
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
When I do this, I get the following build error when I run ./gradlew run in command line:
FAILURE: Build failed with an exception.
* Where:
Build file '.../elasticsearch/docs/build.gradle' line: 21
* What went wrong:
A problem occurred evaluating project ':docs'.
> Failed to apply plugin [id 'org.gradle.java']
> Cannot add a SourceSet with name 'test' as a SourceSet with that name already exists.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
What is the best way to print standard streams into the console?