Partager via


Logging.Warn Method

Definition

Overloads

Warn(String, String)

Displays messages that may represent a problem.

Warn(String, String, Object[])

Displays messages that may represent a problem.

Warn(String, String)

Displays messages that may represent a problem.

public:
 static void Warn(System::String ^ appName, System::String ^ message);
public static void Warn (string appName, string message);
static member Warn : string * string -> unit
Public Shared Sub Warn (appName As String, message As String)

Parameters

appName
String

Specifies the name of the application.

message
String

Specifies the message to place in the log.

Exceptions

Configuration-related exceptions are wrapped in this common exception type.

Logging listeners are not permitted to call methods of the Logging class.

Remarks

It only displays when the TraceSwitch is assigned TraceWarning. It takes the string passed in and sends it to any trace listener. It also will display it in a list control if one has been made available or in the various logs.

Applies to

Warn(String, String, Object[])

Displays messages that may represent a problem.

public:
 static void Warn(System::String ^ appName, System::String ^ format, ... cli::array <System::Object ^> ^ parameters);
public static void Warn (string appName, string format, params object[] parameters);
static member Warn : string * string * obj[] -> unit
Public Shared Sub Warn (appName As String, format As String, ParamArray parameters As Object())

Parameters

appName
String

Specifies the name of the application

format
String

Specifies the string format of the message

parameters
Object[]

Specifies the parameters to be substituted into the string format

Exceptions

Configuration-related exceptions are wrapped in this common exception type.

Logging listeners are not permitted to call methods of the Logging class.

Remarks

It only displays when the TraceSwitch is assigned TraceWarning. It takes the string passed in and sends it to any trace listener. It also will display it in a list control if one has been made available or in the various logs.

Applies to