Partager via


Logging.Trace Method

Definition

Overloads

Trace(String)

Displays messages for debugging but not normal operation.

Trace(String, String)

Displays messages for debugging but not normal operation.

Trace(String, String, Object[])

Displays messages for debugging but not normal operation

Trace(String)

Displays messages for debugging but not normal operation.

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

Parameters

message
String

Specifies the message to write out to the trace.

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

Trace(String, String)

Displays messages for debugging but not normal operation.

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

Parameters

appName
String

Specifies the name of the application.

message
String

Specifies the message to write out to the trace.

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

Trace(String, String, Object[])

Displays messages for debugging but not normal operation

public:
 static void Trace(System::String ^ appName, System::String ^ format, ... cli::array <System::Object ^> ^ parameters);
public static void Trace (string appName, string format, params object[] parameters);
static member Trace : string * string * obj[] -> unit
Public Shared Sub Trace (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 TraceVerbose. 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