<echo>

Writes a message to the build log or a specified file.

The message can be specified using the message attribute or as inline content. If neither is included - or the message contains only whitespace - then an empty message will be emitted in the output.

Macros in the message will be expanded.

When writing to a file, the level attribute is ignored.

Note: Since NAnt 0.86, a newline will no longer be implictly added when writing a message to a file.

Parameters

Attribute Type Description Required
append bool Determines whether the <echo> task should append to the file, or overwrite it. By default, the file will be overwritten. False
encoding Encoding The encoding to use when writing message to a file. The default is UTF-8 encoding without a Byte Order Mark (BOM). False
file file The file to write the message to. False
level Level The logging level with which the message should be output. The default is Info. False
message string The message to output. False
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Examples

Requirements

Assembly: NAnt.Core (0.91.4312.0)