Class AppenderLoggingException

  • All Implemented Interfaces:
    java.io.Serializable

    public class AppenderLoggingException
    extends LoggingException
    Thrown from an appender when a log event could not be written. Appenders should not thrown an exception if an error occurs that does not stop the event from being successfully written. Those types of errors should be logged using the StatusLogger. Appenders should only throw exceptions when an error prevents an event from being written. Appenders must throw an exception in this case so that error-handling features like the FailoverAppender work properly.

    Also note that appenders must provide a way to suppress exceptions when the user desires and abide by that instruction. See Appender.ignoreExceptions(), which is the standard way to do this.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      AppenderLoggingException​(java.lang.String message)
      Constructs an exception with a message.
      AppenderLoggingException​(java.lang.String format, java.lang.Object... args)
      Constructs an exception with a message.
      AppenderLoggingException​(java.lang.String message, java.lang.Throwable cause)
      Constructs an exception with a message and underlying cause.
      AppenderLoggingException​(java.lang.Throwable cause)
      Constructs an exception with an underlying cause.
      AppenderLoggingException​(java.lang.Throwable cause, java.lang.String format, java.lang.Object... args)
      Constructs an exception with a message.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AppenderLoggingException

        public AppenderLoggingException​(java.lang.String message)
        Constructs an exception with a message.
        Parameters:
        message - The reason for the exception
      • AppenderLoggingException

        public AppenderLoggingException​(java.lang.String format,
                                        java.lang.Object... args)
        Constructs an exception with a message.
        Parameters:
        format - The reason format for the exception, see String.format(String, Object...).
        args - The reason arguments for the exception, see String.format(String, Object...).
        Since:
        2.12.1
      • AppenderLoggingException

        public AppenderLoggingException​(java.lang.String message,
                                        java.lang.Throwable cause)
        Constructs an exception with a message and underlying cause.
        Parameters:
        message - The reason for the exception
        cause - The underlying cause of the exception
      • AppenderLoggingException

        public AppenderLoggingException​(java.lang.Throwable cause)
        Constructs an exception with an underlying cause.
        Parameters:
        cause - The underlying cause of the exception
      • AppenderLoggingException

        public AppenderLoggingException​(java.lang.Throwable cause,
                                        java.lang.String format,
                                        java.lang.Object... args)
        Constructs an exception with a message.
        Parameters:
        cause - The underlying cause of the exception
        format - The reason format for the exception, see String.format(String, Object...).
        args - The reason arguments for the exception, see String.format(String, Object...).
        Since:
        2.12.1