servicemanager.SetEventSourceName
SetEventSourceName(sourceName, registerNow)
Sets the event source name for event log entries written by the service.
Parameters
Note that in some cases, the service itself will not have permission to write the event source in the registry. Therefore, it would be prudent for your installation program to call this function with registerNow=True, to ensure your services can write useful entries.