GridProtectionAlliance / gsf

Grid Solutions Framework
https://gridprotectionalliance.org/NightlyBuilds/GridSolutionsFramework/Help/index.html
MIT License
161 stars 69 forks source link

Fix issue when EventLog Source does not exist #258

Closed clackner-gpa closed 3 months ago

clackner-gpa commented 3 months ago

When the application tries to write to a windows event log source that does not affect it currently fails to start without any error. The installer usually creates the datasource so this is only an issue when running debug on a system that has never had the installer run.

This commit just prevents an exception in the EventLog writing from failing out the entire startup/initialization routine. Note that the GSF logger may not be up at that point so writing there is not an option until later.