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 3.1 KiB

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