Udostępnij za pośrednictwem


TraceSource Property (My.Application.Log and My.Log)

Gets to the TraceSource object that underlies the Log object.

' Usage
Dim value As System.Diagnostics.TraceSource = My.Application.Log.TraceSource
' Web usage
Dim value As System.Diagnostics.TraceSource = My.Log.TraceSource
' Declaration
Public ReadOnly Property TraceSource As System.Diagnostics.TraceSource

Property Value

Returns the TraceSource object that underlies the Log object.

Remarks

You can use this property to determine the current configuration of the Log object.

In client applications, the Log object is available through the My.Application.Log object. In Web applications, the Log object is available through the My.Log object.

This is an advanced member; it does not show in IntelliSense unless you select the All tab.

Tasks

The following table lists an example of a task involving the TraceSource property.

To

See

Get information for each of the Log object's log listeners.

Troubleshooting: Log Listeners

Requirements

Namespace:Microsoft.VisualBasic.Logging

Class:Log

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Availability by Project Type

Project type

Available

Windows Application

Yes

Class Library

Yes

Console Application

Yes

Windows Control Library

Yes

Web Control Library

No

Windows Service

Yes

Web Site

Yes

Permissions

No permissions are required.

See Also

Tasks

Troubleshooting: Log Listeners

Reference

My.Application.Log Object

My.Log Object

System.Diagnostics.TraceSource

Log.TraceSource