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.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. As XML parsers are wont to do, the first newline in the text element
  70. has been included in the text.
  71. <pre>&lt;echo message=&quot;Deleting drive C:&quot; level=&quot;debug&quot;/&gt;</pre>
  72. A message which only appears in <tt>-debug</tt> mode.
  73. <pre>&lt;echo level=&quot;error&quot;&gt;
  74. Imminent failure in the antimatter containment facility.
  75. Please withdraw to safe location at least 50km away.
  76. &lt;/echo&gt;
  77. </pre>
  78. A message which appears even in <tt>-quiet</tt> mode.
  79. <pre>&lt;echo file="runner.csh" append="false"&gt;#\!/bin/tcsh
  80. java-1.3.1 -mx1024m ${project.entrypoint} $$*
  81. </echo></pre>
  82. Generate a shell script by echoing to a file.
  83. Note the use of a double $ symbol to stop Ant
  84. filtering out the single $ during variable expansion
  85. <hr>
  86. <p align="center">Copyright &copy; 2000-2002,2004-2005 The Apache Software Foundation. All rights
  87. Reserved.</p>
  88. </body>
  89. </html>