Custom Event Log Causes Windows Internal Error when full.

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
 
G

Guest

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
 

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