Event Log Setting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
How to set the event log's overwrite property from vb.net

i.e, when v r writting errors in the event log continously, at one point of time the maximum size for that event log will be reached and if v try to write in to the event log it will throw an error message such as "event log is full"
but if set the overwrite property for that eventlog it will overwrite automatically without any error message
i want to set this property thrw vb.net codin

thnks and best regard
Jothi Mages
 
Hi

You can use Clear Metho

Dim MyLog as New EventLog(
MyLog.Log = "MyAppLog
MyLog.Clear(

you must have admin previlage in the computer where the log avaialable

Sooraj P
Microsoft India Community Star
 
Hi Sooraj

thanks for ur idea
but the clear fn will clear all the logs available i dont want to do i like tha
my aim is to override the existing log

thnks and best regard
Jothi Magesh
 
H

You need to go to the Event Viewer. Select the Event Viewer Log. Click Properties. Check the option Overwrite events as needed

Sooraj P
Microsoft India Community Star
 
Back
Top