groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Erick" <Erick.Nel...@hdsupply.com>
Subject RE: Debug logging in AntBuilder
Date Mon, 28 Mar 2016 17:47:34 GMT
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:ysb33r@gmail.com] 
Sent: Monday, March 28, 2016 10:37 AM
To: users@groovy.apache.org
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:ysb33r@gmail.com]
> Sent: Saturday, March 26, 2016 1:27 PM
> To: users@groovy.apache.org
> 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

Mime
View raw message