We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

My.Log Object

Provides a property and methods for writing event and exception information to the application's log listeners.

The My.Log object provides a straightforward entry point with 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.Log object is only available for ASP.NET applications. For client applications, use My.Application.Log. For more information, see My.Application.Log Object.

Namespace: Microsoft.VisualBasic.Logging

Class: Log

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