You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jose Alberto Fernandez <JF...@viquity.com> on 2000/11/17 22:14:38 UTC

RE: Why does the echo task output to System.out? (Was: RE: [submi t] I ntegration of Ant into Visual Age for Java)

> From: Siberski, Wolf [mailto:Wolf.Siberski@tui.de]
> 
 
> 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)? 
> 

As I remember the original <echo> was suppose to send its
output to the same place that all other output of ANT
was suppose to go. At that point System.out.

Now that we are making ANT more embedable, I agree we need
to revise what "default output" means. Also remember
that <echo> can be instructed to send things to files
so it is not always directed to System.out.

> 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).
> 

-1, you should create a <log> task for this.
The two tasks have very different semantics, in particular
when we notice that <echo> is also used to write to files
in general.

Jose Alberto