Application #57. Use the Event Log

Diagnosing and troubleshooting application errors are important parts of application maintenance. You can increase your ability to accurately diagnose application behavior by coding the application to report important conditions, such as errors or changes in configuration, to an external and convenient data store. The Event Log is an excellent place for such messages because it’s fast, easily accessible, and built into the operating system.

New Concepts

The Windows event log system maintains a set of logs and a list of valid event sources. An event source is simply a string your applications use to identify themselves when sending event messages. Each source maps to a single log. This allows applications some ...

Get 101 Microsoft® Visual Basic® .NET Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.