Working with Event Logs

Event logging is the standard way in Windows for applications to log their events. You can easily monitor the behavior of an application by using the Event Viewer utility to analyze its messages in the event log.

In fact, you can also view events from the Visual Studio .NET environment, and you can access event logs through Server Explorer.

The Framework Class Libraries provide a set of classes that are designed to work with event logs. With the help of these classes, you can programmatically read or write to event logs. Programmatic access may even allow you to automate some of the administrative tasks associated with an application.

By default, three event logs are available: Application, Security, and System. Other ...

Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.