Custom Event Log Causes Windows Internal Error when full.

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

Guest

I thought Event Logs overwrite the oldest events when the log is full.

I have created a Custom Event Log for a Windows Service app. When this
Custom Event Log gets full, a call to eventLog.Writeline crashes the service.

When I stop and restart the service, I get a Windows Internal Error and the
service fails to start (because I suspect it never gets past the OnStart
which writes to the event log).

If I empty the Custom Event Log, the service starts fine!

I see no options when creating the Custom Event Log to specify the size, or
that old entries should be overwritten.

Any ideas?

Thanks, Dave
 
I just figured out that you can set the properties of a Custom Event Log from
the Windows Event Log viewer. This resolves my problem, however, I would
like to programatically set the properties of the Custom Event Logs when it
is created...in code.

Thanks, Dave
 
Back
Top