B.21 EchoTask

Echoes a message to the current loggers and listeners which means standard out unless overridden. A level can be specified, which controls at what logging level the message is filtered at.

The task can also echo to a file, in which case the option to append rather than overwrite the file is available, and the level option is ignored

Additionally, the task can echo the contents of a nested fileset element.

Table B.21: Attributes

NameTypeDescriptionDefaultRequired
msg String The string that is to be send to the output.n/aYes
message String Alias for msg. n/aYes
file String The file to write the message to.n/aNo
append Boolean Append to an existing file? false No
level String Control the level at which this message is reported. One of error, warning, info, verbose, debug. info No

B.21.1 Examples

<echo msg="Phing rocks!" />

<echo message="Binarycloud, too." />

<echo>And don't forget Propel.</echo>

<echo file="test.txt" append="false">This is a test message</echo>
        

Echo a previously defined fileset element.

<fileset dir="./tests" id="test.files">
    <include name="**/*Test.php"/>
</fileset>

<echo>
    <fileset refid="test.files"/>
</echo>
        

B.21.2 Supported Nested Tags