The System.Diagnostics.EventLog
class in the framework has a CreateEventSource
method...
EventLog.CreateEventSource(source, logName);
Be aware that to create a new eventLog (or eventLog Source) requires a higher level of authority (WIndows Access Control List (ACL) permissions), than does simply writing to the log, and normally, this access level is not available to most applications... So you will need to make sure your deployment process or deployment msi does the event log/source creation at that time... when the process installing the app should have sufficient permissions.