TaskLoggingHelper.LogMessagesFromFile Method

Definition

Logs errors, warnings, and messages for each line of text in the given file.

Overloads

LogMessagesFromFile(String)

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

LogMessagesFromFile(String, MessageImportance)

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

LogMessagesFromFile(String)

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

public:
 bool LogMessagesFromFile(System::String ^ fileName);
public bool LogMessagesFromFile (string fileName);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public bool LogMessagesFromFile (string fileName);
member this.LogMessagesFromFile : string -> bool
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.LogMessagesFromFile : string -> bool
Public Function LogMessagesFromFile (fileName As String) As Boolean

Parameters

fileName
String

The file to log from.

Returns

true, if any errors were logged

Attributes

Exceptions

Thrown when filename is null.

Remarks

Errors and warnings are logged for lines that fit a particular canonical format. All other lines are logged as messages.

Applies to

LogMessagesFromFile(String, MessageImportance)

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

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

Parameters

fileName
String

The file 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 filename is null.

Remarks

Errors and warnings are logged for lines that fit a particular canonical format. All other lines are logged as messages.

Applies to