TaskLoggingHelper.LogMessageFromText(String, MessageImportance) Method

Definition

Logs an error/warning/message from the given line of text. Errors/warnings are only logged for lines that fit a particular (canonical) format -- all other lines are treated as messages. Thread safe.

C#
public bool LogMessageFromText(string lineOfText, Microsoft.Build.Framework.MessageImportance messageImportance);

Parameters

lineOfText
String

The line of text to log from.

messageImportance
MessageImportance

The importance level for messages that are neither errors nor warnings.

Returns

true, if an error was logged

Exceptions

Thrown when lineOfText is null.

Remarks

Errors messages and warnings are only logged for lines that fit the canonical format. All other lines are treated as messages.

Applies to

Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17