save event log file in c#

L

Lucy

I'd like to save off the Application event log on my servers whenever
it reaches 80% capacity and then clear the log (so that I can wait
until the next time I reach 80% capacity to save it off to a file
again). Does anyone know of any methods I can use to do this?
Thanks in advance.
 
L

Lucy

Off the top of my head, no.  But it's the kind of thing that would
typically be supported via WMI, which .NET provides APIs for.

So, if you can figure out the unmanaged WMI way to do it, you can then
translate that into the managed WMI API to do the same thing from
managed code.

Pete

how do i use wmi to save off the event log? if i save this off and
then clear out the event log regularly, does this ensure that i save
off all events or is there a chance that i could miss one in between
the time that i save it and then clear it?
 

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