Package io.pzstorm.storm.logging
Class StormLogger.Log4JUncaughtExceptionHandler
java.lang.Object
io.pzstorm.storm.logging.StormLogger.Log4JUncaughtExceptionHandler
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
- Enclosing class:
- StormLogger
public static class StormLogger.Log4JUncaughtExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler
This handler will log an error with Log4J when a Thread abruptly terminates due
to an uncaught exception. We need to log unhandled exceptions with Log4J otherwise
they will not appear in the log file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiduncaughtException(Thread t, Throwable e) Handle uncaught exception thrown by Storm by printing an error with Log4J.
-
Constructor Details
-
Log4JUncaughtExceptionHandler
public Log4JUncaughtExceptionHandler()
-
-
Method Details
-
uncaughtException
Handle uncaught exception thrown by Storm by printing an error with Log4J. The error will include the exception stack trace and will be included in the log file.- Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler- Parameters:
t-Threadthat is throwing the exception.e- exception being thrown by thread.
-