Logging from Gradle

mawaldne

New Member
Hey gang,

I've been having problems trying to log output from tests.

When I do a 'gradle test', even if I have logger outputs in the test I'm not seeing anything.

@Cervator - You alluded to something in this comment, but I still wasn't able to get it work. Can you give me a few more details?

Thanks
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Let me try it myself when I get a chance, too much stuff to catch up with tonight, it's 1 am, and I have an appt at 9 am, wee :D
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Okay, that was easier than I thought

gradlew -d test

Note that simply using -d is massively verbose. -i might be more appropriate here. Got that from the http://gradle.org/docs/current/userguid ... ineOptions section

I also run out of heap space when doing the chunk test - but I think that was just another param :)

Still need to switch it around so it isn't part of the main suite sometime!
 

mawaldne

New Member
The final solution to get logging working was to add this to the build.gradle (top level, under sourcesets):

test {
//makes the standard streams (err and out) visible at console when running tests
testLogging.showStandardStreams = true

//tweaking memory settings for the forked vm that runs tests
jvmArgs '-Xms512m', '-Xmx1024m', '-XX:MaxPermSize=128m'
}


Can get logging now!
 
Top