whenever I get an unhandled exception or stacktrace output in the serverconsole, I would rather be saving this to a global logfile. And not to print it in the server console.
How can I prevent or redirect these errors?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Although this is not kosher on java-ee, in general, have a look at
UncaughtExceptionHandler.In earlier days, you had to manage a threadgroup to intercept uncaught exceptions, but now you can set the default handler.