You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by sudip barat <sb...@cisco.com> on 2004/04/29 20:00:42 UTC
How to set ant debugging on from java api call?
Hi
I am invoking ant from my java program and writing the output in a file . I
want to know which property I need to set in project or which api call I
need to make to turn on the debug (equivalent to running ant -debug from
command prompt )? Or is there a project level property I can set in my
build.xml to make it that way ?
Thx
sb
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: How to set ant debugging on from java api call?
Posted by sudip barat <sb...@cisco.com>.
Hi Matt,
thanks for the pointer ! BuidListener works great with
event.getPriority() . I am able to output debug info now
-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com]
Sent: Thursday, April 29, 2004 11:56 AM
To: Ant Users List
Subject: Re: How to set ant debugging on from java api call?
--- sudip barat <sb...@cisco.com> wrote:
>
> Hi
> I am invoking ant from my java program and writing
> the output in a file . I
> want to know which property I need to set in project
> or which api call I
> need to make to turn on the debug (equivalent to
> running ant -debug from
> command prompt )? Or is there a project level
> property I can set in my
> build.xml to make it that way ?
The debuglevel is set per listener rather than on the
whole Project... so you would attach a BuildListener
set up as you need it. You should be able to
configure an oata.DefaultLogger for your purposes.
-Matt
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: How to set ant debugging on from java api call?
Posted by Matt Benson <gu...@yahoo.com>.
--- sudip barat <sb...@cisco.com> wrote:
>
> Hi
> I am invoking ant from my java program and writing
> the output in a file . I
> want to know which property I need to set in project
> or which api call I
> need to make to turn on the debug (equivalent to
> running ant -debug from
> command prompt )? Or is there a project level
> property I can set in my
> build.xml to make it that way ?
The debuglevel is set per listener rather than on the
whole Project... so you would attach a BuildListener
set up as you need it. You should be able to
configure an oata.DefaultLogger for your purposes.
-Matt
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org