ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Advice on modifying the logging output
Date Mon, 18 Dec 2000 05:10:30 GMT
Hi Pete,

Thanks -- but you didn't say where I would put this... DefaultLogger.java?
(Remember, I don't know Java -- I just hack at it as I can whenever I have
to.)

Diane

--- Peter Donald <donaldp@apache.org> wrote:
> At 08:51  17/12/00 -0800, Diane Holt wrote:
> >Can someone who's more familiar with how the default logging output is
> >done tell me whether it'd be feasible to only have targets that are
> >actually running tasks print out, instead of having the target name
> always
> >print? That is, instead of getting:
> 
> try the following. Something like it should work
> 
> 
> protected String m_taskName;
> 
> public void taskStarted(BuildEvent event)
> {
>   m_taskName = event.getTask().getName();
> }
> 
> public void taskFinished(BuildEvent event)
> {
>   m_taskName = null;
> }
> 
> public void messageLogged(BuildEvent event)
> {
>  if( null != m_taskName )
>  {
>     output( "[" + m_taskName + "]\n" );
>     m_taskName = null;
>  }
>  output( event.getMessage() );
> }
> 
> Cheers,
> 
> Pete
> 
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof."                   |
> |              - John Kenneth Galbraith               |
> *-----------------------------------------------------*
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message