Use Jim Moore's LoggingOutputStream. You'll find it in his log4j contrib directory in the release. The javadoc describes how to use it to redirect System.out and System.err.
Best regards, Jim Cakalic -----Original Message----- From: Thomas Saxtoft <[EMAIL PROTECTED]> [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 4:17 AM To: [EMAIL PROTECTED] Subject: 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: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> <font size="1">Confidentiality Warning: This e-mail contains information intended only for the use of the individual or entity named above. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, any dissemination, publication or copying of this e-mail is strictly prohibited. The sender does not accept any responsibility for any loss, disruption or damage to your data or computer system that may occur while using data contained in, or transmitted with, this e-mail. If you have received this e-mail in error, please immediately notify us by return e-mail. Thank you. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>