Interface Appender

    • Method Detail

      • append

        void append​(LogEvent event)
        Logs a LogEvent using whatever logic this Appender wishes to use. It is typically recommended to use a bridge pattern not only for the benefits from decoupling an Appender from its implementation, but it is also handy for sharing resources which may require some form of locking.
        Parameters:
        event - The LogEvent.
      • getName

        String getName()
        Gets the name of this Appender.
        Returns:
        name, may be null.
      • getLayout

        Layout<? extends Serializable> getLayout()
        Returns the Layout used by this Appender if applicable.
        Returns:
        the Layout for this Appender or null if none is configured.
      • ignoreExceptions

        boolean ignoreExceptions()
        Some Appenders need to propagate exceptions back to the application. When ignoreExceptions is false the AppenderControl will allow the exception to percolate.
        Returns:
        true if exceptions will be logged but not thrown, false otherwise.
      • getHandler

        ErrorHandler getHandler()
        Gets the ErrorHandler used for handling exceptions.
        Returns:
        the ErrorHandler for handling exceptions.
      • setHandler

        void setHandler​(ErrorHandler handler)
        Sets the ErrorHandler used for handling exceptions.
        Parameters:
        handler - the ErrorHandler to use for handling exceptions.