Looking for HELPFUL information on my event log issues
-
I have three threads that are trying to write events to a single event log -- with each thread being a separate source. Each thread creates an instance of the EventLog and uses eventLog.WriteLine() to post the event. In initialization each thread checks to see if its' source name is registered to the log. If it not, it registers itself. Then each thread creates an instance of the eventlog passing the logname and source name, after which a success message is posted to the EventLog. The first thread establishes itself and its' events are getting logged without problems, but the other two threads are not getting their events written. Any help would be appreciated.
-
I have three threads that are trying to write events to a single event log -- with each thread being a separate source. Each thread creates an instance of the EventLog and uses eventLog.WriteLine() to post the event. In initialization each thread checks to see if its' source name is registered to the log. If it not, it registers itself. Then each thread creates an instance of the eventlog passing the logname and source name, after which a success message is posted to the EventLog. The first thread establishes itself and its' events are getting logged without problems, but the other two threads are not getting their events written. Any help would be appreciated.
At what point is it failing? 1.
LongRange.Shooter wrote:
each thread checks to see if its' source name is registered to the log
LongRange.Shooter wrote:
If it not, it registers itself
LongRange.Shooter wrote:
a success message is posted to the EventLog
LongRange.Shooter wrote:
thread creates an instance of the eventlog passing the logname and source name
Working through the above list should help solve your problem. You obviously have it coded correctly in the first thread - have you tried altering/controlling the order of these threads to check if the code is functional in the other two - i.e make the second tread do it's stuff first? Just seen the thread below! It looks like you might have found the root of the problem. :)
Dave
modified on Wednesday, May 7, 2008 3:03 PM