ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@ca.ibm.com
Subject Re: Why does the echo task output to System.out? (Was: RE: [submit] I ntegration of Ant into Visual Age for Java)
Date Fri, 17 Nov 2000 15:04:51 GMT


I have to agree with Wolf's analysis of the situation with <echo>.  In
fact, I agree so much I've made the changes he's suggested and commited
them. :-)

Glenn McAllister
Software Developer. IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey


Please respond to ant-dev@jakarta.apache.org

To:   "'ant-dev@jakarta.apache.org'" <ant-dev@jakarta.apache.org>
cc:
Subject:  Why does the echo task output to System.out? (Was: RE: [submit] I
      ntegration of Ant into Visual Age for Java)

Glenn kindly notified me of a bug in our VAJ PlugIn:

> Trapping System.out - this really should be fixed, but its up to you.  If
> you are getting output in a window, you don't expect chunks of pertinent
> output to show up on the console.  People don't write <echo> tasks if
they
> don't want to see output.  If you don't fix it, I'd put a big warning in
> the docs.
>

After having thought about this a little, I'm wondering if
it's not the echo task that should be fixed :-).
It seems to be the only task that does not use
the BuildLogger mechanism for output.

The descriptions says "Echoes a message to System.out",
but that is a description from the implementers point
of view, not the users. I as user would like the
echo output behave as the outputs of all other
tasks (i.e. going to all registered BuildLoggers),
but I'm not sure if this is true for all other
Ant users, too.

Is there any reason for this special behaviour
(besides historical reasons)?

I see an additional advantage when we change
the Echo task to log its output: We could
introduce a new "ouputLevel" property to
control, at which logging levels that message
is displayed (default would be 'always', but
we could introduce 'warning', 'info' and
'verbose', too).

Wolf




Mime
View raw message