Setting Event Log Size setting

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

My app writes events to event log from time to time using below code;

Dim elog As New System.Diagnostics.EventLog("My Event Log")
Dim EventType As System.Diagnostics.EventLogEntryType
EventType = System.Diagnostics.EventLogEntryType.Error
elog.WriteEntry("Some text", EventType, "1001")

Problem is this app is installed on multiple remote sites and form time to
time the event log becomes full one or the other pc and app start to give
error. Is there a way to set the Event Log, Log Size setting to 'Overwrite
events as needed' via code so the event log never fills up?

Many Thanks

Regards
 
Back
Top