ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject Re: -v, writing ant task
Date Sat, 28 Feb 2004 15:46:21 GMT
David Corbin wrote:

>We have our own ant task that we use.  I'd like it to write additional info 
>out when ant is in "verbose" mode.  What is the correct way to do this?
>  
>
Hi David,

the correct way is to do :

log(message, Project.MSG_VERBOSE);

where log is a method inherited for org.apache.tools.ant.Task

if your task is not a child of org.apache.tools.ant.Task, but the task 
still has a reference to a Project object,
you can do directly project.log(message, Project.MSG_VERBOSE) (which is 
nearly the same, except that the name of the task will not appear in the 
log generated by DefaultLogger
spontaneously, you will then has to write it in the message).

Antoine




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message