อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


ApplicationBase.Log Property

Definition

Gets an object that provides properties and methods for writing event and exception information to the application's log listeners.

C#
public Microsoft.VisualBasic.Logging.Log Log { get; }

Property Value

Log

The Log object for the current application.

Examples

This example shows how to use the My.Application.Log.WriteEntry method to log tracing information. For more information, see How to: Write Log Messages.

VB
Public Sub TracingTest(ByVal fileName As String)
    My.Application.Log.WriteEntry( 
        "Entering TracingTest with argument " & 
        fileName & ".")
    ' Code to trace goes here.
    My.Application.Log.WriteEntry( 
        "Exiting TracingTest with argument " & 
        fileName & ".")
End Sub

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 5, 6, 7, 8, 9, 10

See also