Handling event log full error?

  • Thread starter Thread starter Brett Romero
  • Start date Start date
B

Brett Romero

I log errors to the event log. Sometimes this fails because the event
log is full. Is there a good or graceful way to handle that without
retro fitting a bunch of try/catch blocks?

Thanks,
Brett
 
Brett said:
I log errors to the event log. Sometimes this fails because the event
log is full. Is there a good or graceful way to handle that without
retro fitting a bunch of try/catch blocks?

Thanks,
Brett

Do you have a single WriteToEventLog() function? If so then that is an
obvious place to put the error handler. If not then can you set up a
new event - EventLogUpdated - and put the error handler in the handler
for that event?

Alternatively make the event log circular so it never overflows, once
capacity is reached each new entry just overwrites the oldest entry.

rossum
 
I log errors to the event log. Sometimes this fails because the event
log is full. Is there a good or graceful way to handle that without
retro fitting a bunch of try/catch blocks?

Thanks,
Brett

Brett,

try to set the properties of the event-log itself? -- it's not really
about the Events itself since you can't alter it through code.

Leon
 
Is setting the event log to overwrite something that I can do through
code? Or does this have to be done manually by the user?

Thanks,
Brett
 
Back
Top