The echo task outputs the corresponding information based on the logger (log) or listener (listener) level. It is equivalent to system. Out in Java to output information. The echo task has the following attributes:
(1) message: used to define the information to be output. This attribute is required.
(2) file: used to define a file. This file is used to receive the output information defined by the message. It takes effect only when it is set to output the information to the receiving file.
(3) append: used to specify whether information is output to the specified file. The default value is false.
(4) level: Specifies the level of this information. Optional values: error, warning, info, verbose, or debug.
Echo tasks are easy to use. For example, to define the output of a message, the Code is as follows:
<Echo message = "this is a simple message, out print by ECHO task! "/>
When you need to output information to a specific file, you can write the echo task as follows:
<Echo message = "this is a simple message, out print by ECHO task! "File ="/logs/messge. log "APPEND =" true "/>
The purpose of this example is to output the information to the/logs/message. Log File, rather than directly output the information to the command line.