D
Dennis
I have a service with the following startup code...
When I start the service I see a new entry under...
Computer Management(local)
System Tools
Event Viewer
Application
MyServiceLog <--- new entry
But the actual event I write gets logged with the Application events.
My question is, can I get the events that I write to go under
MyServiceLog? What am I doing wrong?
TIA,
Protected Overrides Sub OnStart(ByVal args() As String)
If Not Diagnostics.EventLog.SourceExists("MyService") Then
Diagnostics.EventLog.CreateEventSource("MyService", "MyServiceLog")
End If
Dim _eventLog As New Diagnostics.EventLog
_eventLog.Source = "MyService"
_eventLog.WriteEntry(CStr(TimeOfDay) + " started", EventLogEntryType.Information)
AddHandler m_listTimer.Elapsed, AddressOf myTimerElapsed
m_listTimer.Enabled = True
End Sub
When I start the service I see a new entry under...
Computer Management(local)
System Tools
Event Viewer
Application
MyServiceLog <--- new entry
But the actual event I write gets logged with the Application events.
My question is, can I get the events that I write to go under
MyServiceLog? What am I doing wrong?
TIA,