You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by michael sorens <ms...@myrealbox.com> on 2005/01/26 22:34:37 UTC

accessing the verbose state

 From the command line, one may use -v to get more verbose output.
How is this verbose-state accessed...
(1) ...from within the build file (i.e. ant property presumably) ?
(2) ...from within a custom task ?
(3) ...from within a generic Java class, if possible ?

(4) Are there guidelines for what constitutes verbose output when writing a custom task?

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


Re: accessing the verbose state

Posted by Matt Benson <gu...@yahoo.com>.
--- michael sorens <ms...@myrealbox.com> wrote:

> Basically I was considering having a non-Task java
> class to provide more or less output if run from ant
> and if verbose is set or not. But this is not a
> high-priority issue...
> 
> Also, I found the answer to (1) -- <echo> takes a
> level just as the listeners you described for custom
> tasks, I found.

That sounds opposite to what you said above; I was
under the impression you wanted access to the log
level specified at the command line.

-Matt

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: accessing the verbose state

Posted by michael sorens <ms...@myrealbox.com>.
Basically I was considering having a non-Task java class to provide more or less output if run from ant and if verbose is set or not. But this is not a high-priority issue...

Also, I found the answer to (1) -- <echo> takes a level just as the listeners you described for custom tasks, I found.


On Wed, 26 Jan 2005 14:54:01 -0800 (PST), Matt Benson <gu...@yahoo.com> wrote:

> --- michael sorens <ms...@myrealbox.com> wrote:
>
>> Thank you, Matt, for such a prompt answer to (2) and
>> (4).
>> Anyone else have any thoughts on (1) and (3)? Matt
>> implies "can't be done"...
>
> To elaborate further, a custom BuildLogger is not a
> custom task and thus falls more under the (3) category
> than the (2)...
>
> It might help if you explained why you need access to
> the logging state...
>
> -Matt
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Easier than ever with enhanced search. Learn more.
> http://info.mail.yahoo.com/mail_250
>
> ---------------------------------------------------------------------
> 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: accessing the verbose state

Posted by Matt Benson <gu...@yahoo.com>.
--- michael sorens <ms...@myrealbox.com> wrote:

> Thank you, Matt, for such a prompt answer to (2) and
> (4).
> Anyone else have any thoughts on (1) and (3)? Matt
> implies "can't be done"...

To elaborate further, a custom BuildLogger is not a
custom task and thus falls more under the (3) category
than the (2)...

It might help if you explained why you need access to
the logging state...

-Matt


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

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


Re: accessing the verbose state

Posted by michael sorens <ms...@myrealbox.com>.
Thank you, Matt, for such a prompt answer to (2) and (4).
Anyone else have any thoughts on (1) and (3)? Matt implies "can't be done"...


On Wed, 26 Jan 2005 13:45:15 -0800 (PST), Matt Benson <gu...@yahoo.com> wrote:

> --- michael sorens <ms...@myrealbox.com> wrote:
>
>>  From the command line, one may use -v to get more
>> verbose output.
>> How is this verbose-state accessed...
>> (1) ...from within the build file (i.e. ant property
>> presumably) ?
>> (2) ...from within a custom task ?
>> (3) ...from within a generic Java class, if possible
>> ?
>
> Not knowing exactly what you are after, your only real
> way of accessing the state is to install a custom
> BuildLogger, which must implement a method
> setMessageOutputLevel(int).  If you are only talking
> about logging from a custom task, however, all you do
> is log everything at the appropriate level and the
> listeners will exclude things whose "detail level" is
> greater than that desired per Ant execution.
>
>>
>> (4) Are there guidelines for what constitutes
>> verbose output when writing a custom task?
>>
>
> Not that I know of, but I could be wrong.
>
> -Matt
>
>
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage less.
> http://info.mail.yahoo.com/mail_250
>
> ---------------------------------------------------------------------
> 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: accessing the verbose state

Posted by Matt Benson <gu...@yahoo.com>.
--- michael sorens <ms...@myrealbox.com> wrote:

>  From the command line, one may use -v to get more
> verbose output.
> How is this verbose-state accessed...
> (1) ...from within the build file (i.e. ant property
> presumably) ?
> (2) ...from within a custom task ?
> (3) ...from within a generic Java class, if possible
> ?

Not knowing exactly what you are after, your only real
way of accessing the state is to install a custom
BuildLogger, which must implement a method
setMessageOutputLevel(int).  If you are only talking
about logging from a custom task, however, all you do
is log everything at the appropriate level and the
listeners will exclude things whose "detail level" is
greater than that desired per Ant execution.

> 
> (4) Are there guidelines for what constitutes
> verbose output when writing a custom task?
> 

Not that I know of, but I could be wrong.

-Matt




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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