dhoossr
March 18th, 2005, 12:07 PM
I am developing a Windows Service in C#, and wish to have a custom log for it, instead of using the Application Log. I have created a project installer that includes the creation of the Custom log. All of that works just fine, but when my service writes to the custom event log, the messages end up in the Application log.
This is despite the fact that if I write an entry that shows the result of a call to LogNameFromSource name returns the name of my custom log.
Also, the log entries are all of the form
Event Type: Information
Event Source: WciLogMonitorService
Event Category: None
Event ID: 2
Date: 3/18/2005
Time: 10:01:35 AM
User: N/A
Computer: DAVE-HOOS
Description:
The description for Event ID ( 2 ) in Source ( WciLogMonitorService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Current event log name for source "WciLogMonitorService": "WciLogMonitor".
I suspect that the cause of the entries going into the wrong log is the same as what causes the events not to be displayed properly.
I will appreciate any enlightenment on the subject.
This is despite the fact that if I write an entry that shows the result of a call to LogNameFromSource name returns the name of my custom log.
Also, the log entries are all of the form
Event Type: Information
Event Source: WciLogMonitorService
Event Category: None
Event ID: 2
Date: 3/18/2005
Time: 10:01:35 AM
User: N/A
Computer: DAVE-HOOS
Description:
The description for Event ID ( 2 ) in Source ( WciLogMonitorService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Current event log name for source "WciLogMonitorService": "WciLogMonitor".
I suspect that the cause of the entries going into the wrong log is the same as what causes the events not to be displayed properly.
I will appreciate any enlightenment on the subject.