servicemanager.SetEventSourceName

SetEventSourceName(sourceName, registerNow)

Sets the event source name for event log entries written by the service.

Parameters

sourceName : string

The event source name

registerNow=False : bool

If True, the event source name in the registry will be updated immediately. If False, the name will be registered the first time an event log entry is written via any pythonservice methods (or possibly never if no record if written).
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.