Logging Java Errors and Exceptions
843810Sep 1 2004 — edited Sep 2 2004Hi,
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