The System.Diagnostics.EventLog class allows you to programmatically read and write to the Windows Event log. This functionality allows you to read and write your application logs to the Windows Event Log rather than writing these log entries to a text-based file. This logging methodology provides a quick, easy, and performance friendly way to log any type of event. The EventLog class extends beyond simply writing log entries (reading from logs, creating/deleting event sources, deleting logs, etc.) but this article is geared specifically toward writing to the Windows Event Log.
[Read more...]