Provides a property and methods to write event and exception information to the application's log listeners.
The My.Application.Log object provides a straightforward entry point from which to access the .NET Framework's logging services. The WriteEntry and WriteException methods write messages to the application's log listeners. The listeners can be configured by the application's configuration file. For more information, see Walkthrough: Changing Where My.Application.Log Writes Information and Working with Application Logs in Visual Basic.
The My.Application.Log object is available only for client applications. For Web applications, use My.Log. For more information, see My.Log Object.
The following table lists examples of tasks that involve the My.Application.Log object.
Write event information to the application's log listeners
Write exception information to the application's log listeners
Determine where My.Application.Log writes information
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.
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Availability by Project Type
Windows Control Library
Web Control Library