Differences between revisions 2 and 3
Revision 2 as of 2009-09-20 23:50:51
Size: 1090
Editor: localhost
Comment: converted to 1.6 markup
Revision 3 as of 2011-09-08 07:17:08
Size: 1174
Editor: Craig Young
Comment:
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:

[[http://www.theroofdoctors.net/roof_repairs_dublin.php|roof repairs dublin ca]]

SMTPAppender Class

org.apache.log4j.net.SMTPAppender

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="org.apache.log4j.net.SMTPAppender">
  <param name="BufferSize" value="512" />
  <param name="SMTPHost" value="some.email.host.org" />
  <param name="From" value="appname@server.com" />
  <param name="To" value="adminA@server.com,adminB@server.com" />
  <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" />
  </layout>
  <filter class="org.apache.log4j.varia.LevelRangeFilter">
    <param name="LevelMin" value="error" />
    <param name="LevelMax" value="fatal" />
  </filter>
</appender>

roof repairs dublin ca

SMTPAppender (last edited 2011-09-08 07:17:08 by Craig Young)