|
|
@@ -9,7 +9,14 @@ |
|
|
|
|
|
|
|
<h2><a name="echo">Echo</a></h2> |
|
|
|
<h3>Description</h3> |
|
|
|
<p>Echoes a message to System.out or a file.</p> |
|
|
|
<p>Echoes a message to the current loggers and listeners which |
|
|
|
means <tt>System.out</tt> unless overridden. A <tt>level</tt> |
|
|
|
can be specified, which controls at what logging level the message is |
|
|
|
filtered at. |
|
|
|
<p> |
|
|
|
The task can also echo to a file, in which case the option to append rather |
|
|
|
than overwrite the file is available, and the <tt>level</tt> option is |
|
|
|
ignored</p> |
|
|
|
<h3>Parameters</h3> |
|
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
|
<tr> |
|
|
@@ -44,16 +51,36 @@ |
|
|
|
|
|
|
|
</table> |
|
|
|
<h3>Examples</h3> |
|
|
|
<pre> <echo message="Hello world"/></pre> |
|
|
|
<pre> <echo message="Hello, world"/></pre> |
|
|
|
<pre> |
|
|
|
<echo>This is a longer message stretching over |
|
|
|
two lines. |
|
|
|
</echo> |
|
|
|
</pre> |
|
|
|
<pre> |
|
|
|
<echo> |
|
|
|
This is a longer message stretching over |
|
|
|
two lines. |
|
|
|
three lines; the first line is a blank |
|
|
|
</echo> |
|
|
|
</pre> |
|
|
|
As XML parsers are wont to do, the first newline in the text element |
|
|
|
has been included in the text. |
|
|
|
|
|
|
|
<pre><echo message="Deleting drive C:" level="debug" /></pre> |
|
|
|
A message which only appears in <tt>-debug</tt> mode. |
|
|
|
<pre><echo level="error" > |
|
|
|
Imminent failure in the antimatter containment facility. |
|
|
|
Please withdraw to safe location at least 50km away. |
|
|
|
</echo> |
|
|
|
</pre> |
|
|
|
<pre><echo message="Deleting drive C:" |
|
|
|
level="debug" /></pre> |
|
|
|
A message which appears even in <tt>-quiet</tt> mode. |
|
|
|
|
|
|
|
<pre><echo file="runner.csh" append="false" >#\!/bin/tcsh |
|
|
|
java-1.3.1 -mx1024m ${project.entrypoint} $$* |
|
|
|
</echo></pre> |
|
|
|
Generate a shell script by echoing to a file. |
|
|
|
Note the use of a double $ symbol to stop Ant |
|
|
|
filtering out the single $ during variable expansion |
|
|
|
<hr> |
|
|
|
|
|
|
|
<p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights |
|
|
|