Event log is full

  • Thread starter Thread starter YBraker
  • Start date Start date
Y

YBraker

I have an app that catches errors with Try Catch blocks as
follows:

Catch ex As Exception
Dim Event1 As New EventLog
Event1.Log = "Application"
Event1.Source = "QuickCheck"
Event1.WriteEntry("Error in PlayBalance_EnterEvent. Message
is: " & Chr(13) & ex.ToString)
End Try

In doing so, when the event log gets full, I get an unhandled exception
stating the event log is full. It seems I need a global try catch to
handle this. Can this be done? Is this the best way to handle?


YBraker
 
On the machine, configure the event log to automatically overwrite events as
needed. This effectively "queues" the event messages, throwing away the
oldest. Your limit then is only the size of the event log, which you can
also control to get a nice long history if you want.
 
Back
Top