Handling event log full error?

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
 
R

rossum

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
 
L

Leon Friesema

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
 
B

Brett Romero

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
 

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