a) Creating an Event Log
The EventLog class allows us to create an event log. Here are a couple of overloaded constructors available, but here, I am going to use the simplest one by providing a name for the log only. Also, to use the event log, the Source property needs to be specified and a message needs to be written as well.
Next, to write an entry, I will use the WriteEntry method, by giving the message and the entry type.
If the code is executed, the new event log will be visible in the Windows Event Viewer.
b) Deleting an Event Log
c) Getting existing event logs