You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

echo.html 2.7 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Echo Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="echo">Echo</a></h2>
  8. <h3>Description</h3>
  9. <p>Echoes a message to the current loggers and listeners which
  10. means <tt>System.out</tt> unless overridden. A <tt>level</tt>
  11. can be specified, which controls at what logging level the message is
  12. filtered at.
  13. <p>
  14. The task can also echo to a file, in which case the option to append rather
  15. than overwrite the file is available, and the <tt>level</tt> option is
  16. ignored</p>
  17. <h3>Parameters</h3>
  18. <table border="1" cellpadding="2" cellspacing="0">
  19. <tr>
  20. <td valign="top"><b>Attribute</b></td>
  21. <td valign="top"><b>Description</b></td>
  22. <td align="center" valign="top"><b>Required</b></td>
  23. </tr>
  24. <tr>
  25. <td valign="top">message</td>
  26. <td valign="top">the message to echo.</td>
  27. <td valign="top" align="center">Yes, unless data is included in a
  28. character section within this element.</td>
  29. </tr>
  30. <tr>
  31. <td valign="top">file</td>
  32. <td valign="top">the file to write the message to.</td>
  33. <td valign="top" align="center">No</td>
  34. </tr>
  35. <tr>
  36. <td valign="top">append</td>
  37. <td valign="top">Append to an existing file?</td>
  38. <td valign="top" align="center">No - default is false.</td>
  39. </tr>
  40. <tr>
  41. <td valign="top">level</td>
  42. <td valign="top">Control the level at which this message is reported.
  43. One of "error", "warning", "info", "verbose", "debug"</td>
  44. <td valign="top" align="center">No - default is "warning".</td>
  45. </tr>
  46. </table>
  47. <h3>Examples</h3>
  48. <pre> &lt;echo message=&quot;Hello, world&quot;/&gt;</pre>
  49. <pre>
  50. &lt;echo&gt;This is a longer message stretching over
  51. two lines.
  52. &lt;/echo&gt;
  53. </pre>
  54. <pre>
  55. &lt;echo&gt;
  56. This is a longer message stretching over
  57. three lines; the first line is a blank
  58. &lt;/echo&gt;
  59. </pre>
  60. As XML parsers are wont to do, the first newline in the text element
  61. has been included in the text.
  62. <pre>&lt;echo message=&quot;Deleting drive C:&quot; level=&quot;debug&quot; /&gt;</pre>
  63. A message which only appears in <tt>-debug</tt> mode.
  64. <pre>&lt;echo level=&quot;error&quot; &gt;
  65. Imminent failure in the antimatter containment facility.
  66. Please withdraw to safe location at least 50km away.
  67. &lt;/echo&gt;
  68. </pre>
  69. A message which appears even in <tt>-quiet</tt> mode.
  70. <pre>&lt;echo file="runner.csh" append="false" &gt;#\!/bin/tcsh
  71. java-1.3.1 -mx1024m ${project.entrypoint} $$*
  72. </echo></pre>
  73. Generate a shell script by echoing to a file.
  74. Note the use of a double $ symbol to stop Ant
  75. filtering out the single $ during variable expansion
  76. <hr>
  77. <p align="center">Copyright &copy; 2001 Apache Software Foundation. All rights
  78. Reserved.</p>
  79. </body>
  80. </html>