Bagikan melalui


TaskLoggingHelper.LogMessagesFromStream(TextReader, MessageImportance) Method

Definition

Logs errors/warnings/messages for each line of text in the given stream. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

public:
 bool LogMessagesFromStream(System::IO::TextReader ^ stream, Microsoft::Build::Framework::MessageImportance messageImportance);
public bool LogMessagesFromStream (System.IO.TextReader stream, Microsoft.Build.Framework.MessageImportance messageImportance);
member this.LogMessagesFromStream : System.IO.TextReader * Microsoft.Build.Framework.MessageImportance -> bool
Public Function LogMessagesFromStream (stream As TextReader, messageImportance As MessageImportance) As Boolean

Parameters

stream
TextReader

The stream to log from.

messageImportance
MessageImportance

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

Returns

true, if any errors were logged

Exceptions

Thrown when stream is null.

Remarks

This method is not thread-safe.

Applies to