Setting Event Log Size setting

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top