Class DefaultErrorHandler

java.lang.Object
org.apache.logging.log4j.core.appender.DefaultErrorHandler
All Implemented Interfaces:
ErrorHandler

public class DefaultErrorHandler extends Object implements ErrorHandler
The default ErrorHandler implementation falling back to StatusLogger.

It avoids flooding the StatusLogger by allowing either the first 3 errors or errors once every 5 minutes.

  • Constructor Details

    • DefaultErrorHandler

      public DefaultErrorHandler(Appender appender)
  • Method Details

    • error

      public void error(String msg)
      Handle an error with a message.
      Specified by:
      error in interface ErrorHandler
      Parameters:
      msg - a message
    • error

      public void error(String msg, Throwable error)
      Handle an error with a message and an exception.
      Specified by:
      error in interface ErrorHandler
      Parameters:
      msg - a message
      error - a Throwable
    • error

      public void error(String msg, LogEvent event, Throwable error)
      Handle an error with a message, an exception, and a logging event.
      Specified by:
      error in interface ErrorHandler
      Parameters:
      msg - a message
      event - a LogEvent
      error - a Throwable
    • getAppender

      public Appender getAppender()