次の方法で共有


Logging.Error Method

Definition

Overloads

Error(String, String)

Displays messages that represent a problem.

Error(String, String, Exception)

Displays messages that represent a problem.

Error(String, String, Object[])

Display messages that represent a problem.

Error(String, String, String)

Displays messages that represent a problem.

Error(String, String)

Displays messages that represent a problem.

public:
 static void Error(System::String ^ appName, System::String ^ message);
public static void Error (string appName, string message);
static member Error : string * string -> unit
Public Shared Sub Error (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 TraceError. 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

Error(String, String, Exception)

Displays messages that represent a problem.

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

Parameters

appName
String

Specifies the name of the application.

message
String

Specifies the message to place in the log.

exception
Exception

Specifies the exception used in writing out the error.

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 TraceError. 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

Error(String, String, Object[])

Display messages that represent a problem.

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

Parameters

appName
String

Specifies the name of the application

format
String

Specifies the format

parameters
Object[]

Specifies the parameters to be substituted into the stirng 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 TraceError. 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

Error(String, String, String)

Displays messages that represent a problem.

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

Parameters

appName
String

Specifies the name of the application.

message
String

Specifies the message to place in the log.

advanced
String

Specifies the advanced/additional information.

Exceptions

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

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

Remarks

The ShowErrors check is done at the individual listener level. It only displays when the TraceSwitch is assigned TraceError. 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