Interface Appender<E>

    • Method Detail

      • getName

        String getName()
        Get the name of this appender. The name uniquely identifies the appender within its context and is used for configuration and lookup.
        Returns:
        the appender name, or null if not set
      • doAppend

        void doAppend​(E event)
               throws LogbackException
        This is where an appender accomplishes its work: format and deliver the provided event to the appender's destination.

        Implementations should apply any configured filters before outputting the event. Implementations should avoid throwing runtime exceptions; if an error occurs that cannot be handled internally, a LogbackException (or a subtype) may be thrown to indicate a failure during append.

        Parameters:
        event - the event to append; may not be null
        Throws:
        LogbackException - if the append fails in a way that needs to be propagated to the caller
      • setName

        void setName​(String name)
        Set the name of this appender. The name is used by other components to identify and reference this appender (for example in configuration or for status messages).
        Parameters:
        name - the new name for this appender; may be null to unset