Partager via


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.

public:
 bool LogMessageFromText(System::String ^ lineOfText, Microsoft::Build::Framework::MessageImportance messageImportance);
public bool LogMessageFromText (string lineOfText, Microsoft.Build.Framework.MessageImportance messageImportance);
member this.LogMessageFromText : string * Microsoft.Build.Framework.MessageImportance -> bool
Public Function LogMessageFromText (lineOfText As String, messageImportance As MessageImportance) As Boolean

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