...
Open the Registry editor (regedit.exe)
Navigate to your service’s key:
System\CurrentControlSet\Services\WAS
In the “Environment” multi-string value, add the following parameters in separate lines:
SL_LogLevel=6
SL_LogDir=C:\SeaLights\Logs
Perform the previous step on
System\CurrentControlSet\Services\W3SVC
Restart IIS
iisreset /restart
Collecting Profiler logs from Windows Services
...