You can use the Exists method to determine whether a specific log exists. If the log exists, the method returns true. You might use this method if you are creating a custom log and want to make sure that a log by that name does not already exist.
Note Because the Exists method is static, you do not need to create an instance of the EventLog component before you call the method — instead, you can call the method on the EventLog class itself.
You must have registry rights in order to find out if a log exists. If you do not have the appropriate rights, the query will always return false. For information on setting registry rights, see your Windows documentation.
To determine if an event log exists
[Visual Basic] System.Winforms.MessageBox.Show EventLog.Exists("Application") [C#] System.Winforms.MessageBox.Show(EventLog.Exists("Application").ToString());
Tip You can specify a machine name as a second parameter to determine if an event log exists on a remote machine.
Administering Event Logs | Creating and Removing Custom Event Logs