G
Guest
I created a custom log by following a walkthrough. It created NewLog1. I logged several things successfully. I then tried to delete it and send my error messages to the Application log. The problem is that they still go to NewLog1 which doesn't show up in the Event Viewer because I deleted it. I have found the file NewLog1.evt and verified that the file is still receiving the error messages(they are appending) that I am trying to sending to the Application log
I have tried several times to delete NewLog1, but have been unsuccessful
I am very new to .Net. Any help would be appreciated
Rand
----------------------------------------------------------------------------
' Source cannot already exist before creating the log
If EventLog.SourceExists("Benevolence") The
EventLog.DeleteEventSource("Benevolence"
End I
'Logs and Sources are created as a pair
EventLog.CreateEventSource("Benevolence", "Application"
'Associate the EventLog component with the new log
Dim EventLog1 As EventLo
EventLog1 = New EventLo
Dim EventLogMessage As Strin
EventLog1.Log = "Application
EventLog1.Source = "Benevolence
'build message for event lo
EventLogMessage = Err.Description & vbCrLf & "Help link: " & Err.HelpFile & vbCrLf & Err.Source & vbCrLf & Err.Er
EventLog1.WriteEntry(EventLogMessage, Diagnostics.EventLogEntryType.Error, 2
I have tried several times to delete NewLog1, but have been unsuccessful
I am very new to .Net. Any help would be appreciated
Rand
----------------------------------------------------------------------------
' Source cannot already exist before creating the log
If EventLog.SourceExists("Benevolence") The
EventLog.DeleteEventSource("Benevolence"
End I
'Logs and Sources are created as a pair
EventLog.CreateEventSource("Benevolence", "Application"
'Associate the EventLog component with the new log
Dim EventLog1 As EventLo
EventLog1 = New EventLo
Dim EventLogMessage As Strin
EventLog1.Log = "Application
EventLog1.Source = "Benevolence
'build message for event lo
EventLogMessage = Err.Description & vbCrLf & "Help link: " & Err.HelpFile & vbCrLf & Err.Source & vbCrLf & Err.Er
EventLog1.WriteEntry(EventLogMessage, Diagnostics.EventLogEntryType.Error, 2