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 Details

    • Log4JUncaughtExceptionHandler

      public Log4JUncaughtExceptionHandler()
  • Method Details

    • uncaughtException

      public void uncaughtException(Thread t, Throwable e)
      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:
      uncaughtException in interface Thread.UncaughtExceptionHandler
      Parameters:
      t - Thread that is throwing the exception.
      e - exception being thrown by thread.