NAnt SDK Documentation - v0.92 |

# Task.Log Method (Level, String)

Logs a message with the given priority.

[Visual Basic]
Overrides Overloads Public Sub Log( _
ByVal messageLevel As Level, _
ByVal message As String _
)
[C#]
public override void Log(
Level messageLevel,
string message
);

#### Parameters

messageLevel
  The message priority at which the specified message is to be logged.
message
  The message to be logged.

#### Remarks

The actual logging is delegated to the project.

If the Verbose attribute is set on the task and a message is logged with level Verbose, the priority of the message will be increased to Info when the threshold of the build log is Info.

This will allow individual tasks to run in verbose mode while the build log itself is still configured with threshold Info.

The threshold of the project is not taken into account to determine whether a message should be passed to the logging infrastructure, as build listeners might be interested in receiving all messages.

#### See Also

Task Class | NAnt.Core Namespace | Task.Log Overload List