Class SmtpAppender

  • All Implemented Interfaces:
    Appender, Filterable, LocationAware, LifeCycle, LifeCycle2

    @Plugin(name="SMTP",
            category="Core",
            elementType="appender",
            printObject=true)
    public final class SmtpAppender
    extends AbstractAppender
    Send an e-mail when a specific logging event occurs, typically on errors or fatal errors.

    The number of logging events delivered in this e-mail depend on the value of BufferSize option. The SmtpAppender keeps only the last BufferSize logging events in its cyclic buffer. This keeps memory requirements at a reasonable level while still delivering useful application context. By default, an email message will formatted as HTML. This can be modified by setting a layout for the appender. By default, an email message will be sent when an ERROR or higher severity message is appended. This can be modified by setting a filter for the appender.