TaskLoggingHelper.LogWarning Method

Definition

Logs a warning.

Overloads

LogWarning(String, Object[])

Logs a warning with the specified message.

LogWarning(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a warning using the specified message and other warning details.

LogWarning(String, Object[])

Logs a warning with the specified message.

public:
 void LogWarning(System::String ^ message, ... cli::array <System::Object ^> ^ messageArgs);
public void LogWarning (string message, params object[] messageArgs);
member this.LogWarning : string * obj[] -> unit
Public Sub LogWarning (message As String, ParamArray messageArgs As Object())

Parameters

message
String

The message.

messageArgs
Object[]

Optional arguments for formatting the message string.

Exceptions

message is null.

Remarks

This method is not thread-safe.

LogWarning(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a warning using the specified message and other warning details.

public:
 void LogWarning(System::String ^ subcategory, System::String ^ warningCode, System::String ^ helpKeyword, System::String ^ file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, System::String ^ message, ... cli::array <System::Object ^> ^ messageArgs);
public void LogWarning (string subcategory, string warningCode, string helpKeyword, string file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, string message, params object[] messageArgs);
member this.LogWarning : string * string * string * string * int * int * int * int * string * obj[] -> unit
Public Sub LogWarning (subcategory As String, warningCode As String, helpKeyword As String, file As String, lineNumber As Integer, columnNumber As Integer, endLineNumber As Integer, endColumnNumber As Integer, message As String, ParamArray messageArgs As Object())

Parameters

subcategory
String

The description of the warning type.

warningCode
String

The warning code.

helpKeyword
String

The Help keyword to associate with the warning.

file
String

The path to the file containing the warning.

lineNumber
Int32

The line in the file where the warning occurs.

columnNumber
Int32

The column in the file where the warning occurs.

endLineNumber
Int32

The end line in the file where the warning occurs.

endColumnNumber
Int32

The end column in the file where the warning occurs.

message
String

The message.

messageArgs
Object[]

Optional arguments for formatting the message string.

Exceptions

message is null.

Remarks

The parameters subCategory, warningCode, helpKeyword, and file can be null.

The parameters lineNumber, columnNumber, endLineNumber, and endColumnNumber should be set to 0 if they are not available.

Applies to