EventLog settings

G

Guest

I was wondering, is it possible to programmatically change the initial
settings of an EventLog? Specifically, I would like to create an EventLog
that was set to overwrite events as needed rather than overwrite events older
than 7 days, which is the default. I don't want my users to have to use the
Event Viewer interface for this, I just want the log to be setup like that
upon creation. My program generates a lot of log entries, and the log
generally fills up after just a few days if I don't adjust the size or
overwrite policy.

Thanks in advance,
Mike Houglum
 
J

Jani Järvinen [MVP]

Mike,
I was wondering, is it possible to programmatically change the initial
settings of an EventLog?

I'm not exactly sure if I understood your question correctly, but I think
the default settings are hard-coded to the operating system. And even if you
would change them from code, the administrator of the box can of course
change them.
My program generates a lot of log entries, and the log
generally fills up after just a few days if I don't adjust the size or
overwrite policy.

Hmm, if your application generates a lot of entries, then is the Event Log
the correct way to log in the first place? I'm generally against writing
custom solutions when one already exists in the operating system, but think
of a web server writing page hit entries to event log... Not a good idea!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 

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