SMTPAppender Class

The SMTP Appender sends an email through SMTP for each logged message.

SMTPAppender JavaDoc

XML Configuration

Example configuration

This configuration will email any log message that is an error or higher.

<appender name="AdministratorEmail" class="">
  <param name="BufferSize" value="512" />
  <param name="SMTPHost" value="" />
  <param name="From" value="" />
  <param name="To" value="," />
  <param name="Subject" value="SomeApplication on SomeServer12" />
  <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern"
      value="[%d{ISO8601}]%n%n%-5p%n%n%c%n%n%m%n%n" />
  <filter class="org.apache.log4j.varia.LevelRangeFilter">
    <param name="LevelMin" value="error" />
    <param name="LevelMax" value="fatal" />

roof repairs dublin ca

SMTPAppender (last edited 2012-10-07 17:57:19 by RalphGoers)