<echo> Element

Format

<echo [ message="a message" ] 
      [ file="a_filename" ] 
      [ append= ( "on" | "off"| "yes"| "no"| "true"| "false") ] 
      [ level=( "errors" | "warnings" | "normal" | "verbose" | "debug") ] 
      [ input="an_input_filename" ] 
>
[ a much longer message ]
</echo>

Description

Outputs text to console or to a file. Macro substitutions are performed on the message text before writing the output.

Parameters

Attribute Description Required
message a string with the message to output No
file the path of the file to which the output should go No
append boolean. a value of true (on,yes) indicates that the message should be appended to the file No
level indicates the debug level at which the message should be output. A level of error always outputs the message. A level of debug outputs the message only if the log level is set to debug. No
input the path of a file from which message text should be read No

Nested Elements

The <echo> task supports no nested elements, but the text between the opening and closing tags can be used to place a longer message.

Examples

  <echo message="The TEMP environment variable is %{TEMP}" />

  <tstamp/>
  <echo>
    This software is Coypright (C) ${year} My Self
  </tstamp>

  <echo file="build.log" append="yes" level="errors" >
    Built again on ${year}-${month}-${day} ${hour}:${minute}
  </echo>

  <!-- 
    read an input template file that contains macros
    and output it with macros substituted
  -->
  <echo>
    <input path="ProductVersion.template.pas" />
    <file  path="version.rc" />
  </echo>