This might not solve your problem but there is something to mention:
You can not use an
EventLog
just after having it registered because the system needs some time to refresh the list of registered sources. Therefore, it is recommended to create it during installation or exit the application after registering upon the first execution:
Quote:
Create the new event source during the installation of your application. This allows time for the operating system to refresh its list of registered event sources and their configuration. If the operating system has not refreshed its list of event sources, and you attempt to write an event with the new source, the write operation will fail.
Because you have probably started your services multiple times meanwhile, the sources should have been registered. But you should note this fact when installing on other machines.
There is also no need to set the
Log
property when the
Source
has been set:
Quote:
When you write a log entry, the system uses the Source to find the appropriate log in which to place your entry
Setting the
Log
property is provided for reading log files.
All quotes from the MSDN EventLog pages (e.g.
EventLog.CreateEventSource Method (String, String) (System.Diagnostics)[
^]).
You don't get log entries written by one service and got an error when stopping that service (please show the full message as already suggested in my comment). That may be also sourced by a problem not related to the logging at all.