V
Victor
I am writing a Windows Service Application that requires to write to a
custom event log (Tracker)
EventLog.DeleteEventSource("trkProcessMin")
' check if log exists on this machine, create a custom event
log
If Not EventLog.SourceExists("trkProcessMin") Then
EventLog.CreateEventSource("trkProcessMin", "Tracker")
End If
'create a log instance variable to manipulate the custom event
log
Me.trkMinLog.Log = "Tracker"
Me.trkMinLog.Source = "trkProcessMin"
I have set Autolog property to false, so that no logging occurs on the
default log - Application. However, event messages are posted to the
Application log, not the custom event log (Tracker)!. Furthermore, the
messages contain additional text, see below
Event Type: Information
Event Source: trkProcessMin
Event Category: None
Event ID: 0
Date: 20/10/2003
Time: 11:20:17
User: N/A
Computer: Test
Description:
The description for Event ID ( 0 ) in Source ( trkProcessMin ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. The following information is part of the event: Tracker tool
started.
How can I get the service write to custom event log. And why can't the
description be found in the event above?
Any help is appreciated.
custom event log (Tracker)
EventLog.DeleteEventSource("trkProcessMin")
' check if log exists on this machine, create a custom event
log
If Not EventLog.SourceExists("trkProcessMin") Then
EventLog.CreateEventSource("trkProcessMin", "Tracker")
End If
'create a log instance variable to manipulate the custom event
log
Me.trkMinLog.Log = "Tracker"
Me.trkMinLog.Source = "trkProcessMin"
I have set Autolog property to false, so that no logging occurs on the
default log - Application. However, event messages are posted to the
Application log, not the custom event log (Tracker)!. Furthermore, the
messages contain additional text, see below
Event Type: Information
Event Source: trkProcessMin
Event Category: None
Event ID: 0
Date: 20/10/2003
Time: 11:20:17
User: N/A
Computer: Test
Description:
The description for Event ID ( 0 ) in Source ( trkProcessMin ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. The following information is part of the event: Tracker tool
started.
How can I get the service write to custom event log. And why can't the
description be found in the event above?
Any help is appreciated.