Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Logging Java Errors and Exceptions

843810Sep 1 2004 — edited Sep 2 2004
Hi,

Is there a way to catch all of the exceptions that would otherwise be spilled to the cosole output? What I want to do is create a logging functionality that would keep track of any errors that occur. So that if a customer is having problems, and we are unable to recreate the problem with our testing, they could email or send us their log file (which we could look at).

For exceptions that are explicitly caught in the application, I would provide a logError() function. But I was wondering about things like NullPointerExceptions and other exceptions that java doesn't make you catch. This application is a Swing app so it gets a little more complex here. If an exception is thrown during the EDT, then it is spilled out to the console. Is there a way to look at these exceptions before they are spilled?

Thanks,
Reg
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2004
Added on Sep 1 2004
2 comments
191 views