Using Event Logs
Event logs are a centralized means in the Windows platform to keep track of diagnostic information about running software components in the system. Both the operating system and its services and third-party applications can plug in to it. The designers of the .NET Framework deemed it useful to have a managed wrapper around the APIs used to communicate with the event logging component of Win32.
EventLog class in
System.Diagnostics is the wrapper class for event logs exposed to managed code. Various static methods are available to create what’s known as an event source, basically an identifier to correlate an event log entry with its origin. In addition, methods such as
WriteEvent are available to write to a ...