it seems to fail if AntBuilder is created within a Gradle plugin (at least with Gradle 2.0).

On 28/03/2016 18:47, Nelson, Erick wrote:
Curious

Antbuilder seems to have a console appender by default



When I run this...

def ant = new AntBuilder()
ant.project.buildListeners.each { it.messageOutputLevel = ant.project.MSG_DEBUG 
}
ant.project.log('debug test', project.MSG_DEBUG)
ant.project.log('info test', project.MSG_INFO)
ant.project.log('error test', project.MSG_ERR)

I get this...

debug test
info test
error test



And when I run this...

def ant = new AntBuilder()
ant.project.buildListeners.each { it.messageOutputLevel = ant.project.MSG_DEBUG 
}
ant.project.log('debug test', project.MSG_DEBUG)
ant.project.log('info test', project.MSG_INFO)
ant.project.log('error test', project.MSG_ERR)

I get this...

info test
error test




And when I run this...

def ant = new AntBuilder()
ant.project.buildListeners.each { it.messageOutputLevel = ant.project.MSG_ERR }
ant.project.log('debug test', project.MSG_DEBUG)
ant.project.log('info test', project.MSG_INFO)
ant.project.log('error test', project.MSG_ERR)

I get this...

error test






-----Original Message-----
From: Schalk Cronjé [mailto:[email protected]]
Sent: Monday, March 28, 2016 10:37 AM
To: [email protected]
Subject: Re: Debug logging in AntBuilder

Unfortunately that does not work for me. Having checked the Ant docs,
there is not messageOutputLevel on BuildLIstener.

On 28/03/2016 17:51, Nelson, Erick wrote:
Along with CliBuilder....

def ant = new AntBuilder()
ant.project.buildListeners.each { it.messageOutputLevel = ant.project.MSG_DEBUG 
}


-----Original Message-----
From: Schalk Cronjé [mailto:[email protected]]
Sent: Saturday, March 26, 2016 1:27 PM
To: [email protected]
Subject: Debug logging in AntBuilder

When using Ant from the command0line one can pass -debug to turn debug
logging on. I want to do the same when using an AntBuilder instance, but
i cannot any reference on how this can be done (or whther it is indeed
possible).

Any pointers?




--
Schalk W. Cronjé
Twitter / Ello / Toeter : @ysb33r

Reply via email to