You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Thomas Saxtoft <t.saxtoft@sondagsavisen.dk>" <t....@sondagsavisen.dk> on 2002/12/11 11:17:13 UTC

Catching uncaught exceptions

This is really two problems, but since it is concerned with logging I give you both.

We have created a Java client, and now we wish to log all uncaught exceptions. As it is now exceptions thrown in threads and other uncaught exceptions are written to standard error out I believe.
I think that I could redirect all exceptions to another output, but here is the second problem. I would like to write all these exceptions to a logger.

So my two problems are:
1. How do I catch all uncaught exceptions?
2. And how do I write them to a logger?

Thank you,

Thomas Saxtoft





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>