The service writes nothing to the event log
The Windows service is running, but Event Viewer shows no entries from the source Wkl.Data.Gateway.
Environment
Windows service set up manually with sc.exe (without the installation package).
Cause
The service writes to the event log only if the event source Wkl.Data.Gateway is registered. The
service account isn't allowed to create it itself; the installation (setup-host) does that. Without
the source, the service still runs.
Resolution
Register the source once as an administrator in Windows PowerShell 5.1 (New-EventLog doesn't exist
in PowerShell 7):
New-EventLog -LogName Application -Source Wkl.Data.Gateway
setup-host registers it as well, but also sets up the data folder, configuration file, and firewall
in the process; for a manually set up service, the line above is enough.
Verification
After a restart of the service, an entry from the source Wkl.Data.Gateway appears in
Application.
To see only these entries, create a custom view: Action > Create Custom View, By source
Wkl.Data.Gateway.
Entries of the service in a custom view of Event Viewer (German-language Windows).