Custom Event Log message text

  • Thread starter Thread starter Brian Fulford
  • Start date Start date
B

Brian Fulford

In my application event log... my service logs messages fine... but all the
entries have more text than what I assigned to the message text.. ideas
why???



The description for Event ID ( 0 ) in Source ( CheckECHStats ) 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: Service
Stopped.
 
Hi Brian,

I'm not quite sure how this occurs with limited information. Generally, you
got this message when the Event Source was deleted or an application was
uninstalled. Did you use System.Diagnostics.EventLog.DeleteEventSource to
delete the Event Source in your application after writing logs?

Would you please provide me with some of your codes so that I can help you
more quickly?.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Kevin,

I wasnt Deleting the Event Source.. but I did figure it out in a round about
way. I wasnt calling the system.diagnostics.eventlog.createeventsource.. I
was calling eventlog1.createeventsource.... changing this seems to have
gotten the right message text into the event log without the extra verbiage.

If Not System.Diagnostics.EventLog.SourceExists("CheckECHStats") Then

System.Diagnostics.EventLog.CreateEventSource("CheckECHStats", "Check ECH
Stats Log")

End If

EventLog1.Source = "CheckECHStats"

EventLog1.Log = "Check ECH Stats Log"
 
Hi Brian,

I'm glad to hear that you've get out the problem so quickly.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top