Partilhar via


TaskLoggingHelper.LogMessageFromResources Method

Definition

Logs a message with the specified resource string.

Overloads

LogMessageFromResources(String, Object[])

Logs a message using the specified resource string. Thread safe.

LogMessageFromResources(MessageImportance, String, Object[])

Logs a message of the given importance using the specified resource string. Thread safe.

LogMessageFromResources(String, Object[])

Source:
TaskLoggingHelper.cs

Logs a message using the specified resource string. Thread safe.

public:
 void LogMessageFromResources(System::String ^ messageResourceName, ... cli::array <System::Object ^> ^ messageArgs);
public void LogMessageFromResources (string messageResourceName, params object[] messageArgs);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void LogMessageFromResources (string messageResourceName, params object[] messageArgs);
member this.LogMessageFromResources : string * obj[] -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.LogMessageFromResources : string * obj[] -> unit
Public Sub LogMessageFromResources (messageResourceName As String, ParamArray messageArgs As Object())

Parameters

messageResourceName
String

The name of the string resource to load.

messageArgs
Object[]

Optional arguments for formatting the loaded string.

Attributes

Exceptions

Thrown when messageResourceName is null.

Remarks

The MessageImportance value of a message is Normal by default.

Applies to

LogMessageFromResources(MessageImportance, String, Object[])

Source:
TaskLoggingHelper.cs

Logs a message of the given importance using the specified resource string. Thread safe.

public:
 void LogMessageFromResources(Microsoft::Build::Framework::MessageImportance importance, System::String ^ messageResourceName, ... cli::array <System::Object ^> ^ messageArgs);
public void LogMessageFromResources (Microsoft.Build.Framework.MessageImportance importance, string messageResourceName, params object[] messageArgs);
member this.LogMessageFromResources : Microsoft.Build.Framework.MessageImportance * string * obj[] -> unit
Public Sub LogMessageFromResources (importance As MessageImportance, messageResourceName As String, ParamArray messageArgs As Object())

Parameters

importance
MessageImportance

The importance level of the message.

messageResourceName
String

The name of the string resource to load.

messageArgs
Object[]

Optional arguments for formatting the loaded string.

Exceptions

Thrown when messageResourceName is null.

Remarks

Take care to order the parameters correctly or the other overload will be called inadvertently.

Applies to