Partager via


TaskLoggingHelper.LogWarning Method

Definition

Logs a warning.

Overloads

LogWarning(String, Object[])

Logs a warning using the specified string. Thread safe.

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

Logs a warning using the specified string and other warning details. Thread safe.

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

Logs a warning using the specified string and other warning details. Thread safe.

LogWarning(String, Object[])

Source:
TaskLoggingHelper.cs

Logs a warning using the specified string. Thread safe.

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

Parameters

message
String

The message string.

messageArgs
Object[]

Optional arguments for formatting the message string.

Attributes

Exceptions

Thrown when message is null.

Remarks

This method is not thread-safe.

Applies to

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

Source:
TaskLoggingHelper.cs

Logs a warning using the specified string and other warning details. Thread safe.

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

Description of the warning type (can be null).

warningCode
String

The warning code (can be null).

helpKeyword
String

The help keyword for the host IDE (can be null).

file
String

The path to the file causing the warning (can be null).

lineNumber
Int32

The line in the file causing the warning (set to zero if not available).

columnNumber
Int32

The column in the file causing the warning (set to zero if not available).

endLineNumber
Int32

The last line of a range of lines in the file causing the warning (set to zero if not available).

endColumnNumber
Int32

The last column of a range of columns in the file causing the warning (set to zero if not available).

message
String

The message string.

messageArgs
Object[]

Optional arguments for formatting the message string.

Exceptions

Thrown when 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

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

Source:
TaskLoggingHelper.cs

Logs a warning using the specified string and other warning details. Thread safe.

public:
 void LogWarning(System::String ^ subcategory, System::String ^ warningCode, System::String ^ helpKeyword, System::String ^ helpLink, 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 helpLink, string file, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber, string message, params object[] messageArgs);
member this.LogWarning : string * string * string * string * string * int * int * int * int * string * obj[] -> unit
Public Sub LogWarning (subcategory As String, warningCode As String, helpKeyword As String, helpLink 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

Description of the warning type (can be null).

warningCode
String

The warning code (can be null).

helpKeyword
String

The help keyword for the host IDE (can be null).

helpLink
String

A link pointing to more information about the warning (can be null).

file
String

The path to the file causing the warning (can be null).

lineNumber
Int32

The line in the file causing the warning (set to zero if not available).

columnNumber
Int32

The column in the file causing the warning (set to zero if not available).

endLineNumber
Int32

The last line of a range of lines in the file causing the warning (set to zero if not available).

endColumnNumber
Int32

The last column of a range of columns in the file causing the warning (set to zero if not available).

message
String

The message string.

messageArgs
Object[]

Optional arguments for formatting the message string.

Exceptions

Thrown when message is null.

Applies to