[logback-dev] svn commit: r999 - in logback/trunk: logback-examples/src/main/java/chapter4/conf/access logback-site/src/site/xdocTemplates/manual
noreply.seb at qos.ch
noreply.seb at qos.ch
Fri Nov 24 14:57:59 CET 2006
Author: seb
Date: Fri Nov 24 14:57:58 2006
New Revision: 999
Added:
logback/trunk/logback-examples/src/main/java/chapter4/conf/access/
logback/trunk/logback-examples/src/main/java/chapter4/conf/access/logback-SMTP.xml
Modified:
logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
Log:
small documentation update
Added: logback/trunk/logback-examples/src/main/java/chapter4/conf/access/logback-SMTP.xml
==============================================================================
--- (empty file)
+++ logback/trunk/logback-examples/src/main/java/chapter4/conf/access/logback-SMTP.xml Fri Nov 24 14:57:58 2006
@@ -0,0 +1,21 @@
+<configuration>
+
+ <appender name="SMTP"
+ class="ch.qos.logback.access.net.SMTPAppender">
+ <layout class="ch.qos.logback.access.html.HTMLLayout">
+ <Pattern>%h%l%u%t%r%s%b</Pattern>
+ </layout>
+
+ <b>
+ <Evaluator class="ch.qos.logback.access.net.URLEvaluator">
+ <URL>url1.jsp</URL>
+ <URL>directory/url2.html</URL>
+ </Evaluator>
+ </b>
+ <From>sender_email at host.com</From>
+ <SMTPHost>mail.domain.com</SMTPHost>
+ <To>recipient_email at host.com</To>
+ </appender>
+
+ <appender-ref ref="SMTP" />
+</configuration>
\ No newline at end of file
Modified: logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml
==============================================================================
--- logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml (original)
+++ logback/trunk/logback-site/src/site/xdocTemplates/manual/appenders.xml Fri Nov 24 14:57:58 2006
@@ -1462,8 +1462,8 @@
<p>
The <a href="../xref/ch/qos/logback/classic/net/SMTPAppender.html"><code>SMTPAppender</code></a>
accumulates logging events in a fixed-size buffer and sends them in an email when a
- user specified triggering event occurs.
- By default, the triggering event is taken as the reception of an event
+ user specified event occurs.
+ By default, the email is sent as the reception of an event
of level <em>ERROR</em> or higher.
</p>
@@ -2419,13 +2419,42 @@
<!--
<h3>SocketAppender</h3>
-
+-->
+
<h3>SMTPAppender</h3>
+ <p>
+ Access' <code>SMTPAppender</code> works in the same way as its Classic counterpart.
+ However, the evaluator is rather different. By default, the <code>URLEvaluator</code>
+ is used by <code>SMTPAppender</code>. This evaluator contains a list of URLs that are
+ checked agains the current request's URL. When one of the pages given to the
+ <code>URLEvaluator</code> is requested, <code>SMTPAppender</code> sends an email.
+ </p>
+
+ <p>
+ Here is a sample configuration of a <code>SMTPAppender</code> in the access environnement.
+ </p>
+<em>Example 4.15: <code>SMTPAppender</code> configuration (logback-examples/src/main/java/chapter4/conf/access/logback-smtp.xml)</em>
+<div class="source"><pre><appender name="SMTP"
+ class="ch.qos.logback.access.net.SMTPAppender">
+ <layout class="ch.qos.logback.access.html.HTMLLayout">
+ <Pattern>%h%l%u%t%r%s%b</Pattern>
+ </layout>
+
+ <b><Evaluator class="ch.qos.logback.access.net.URLEvaluator">
+ <URL>url1.jsp</URL>
+ <URL>directory/url2.html</URL>
+ </Evaluator></b>
+ <From>sender_email at host.com</From>
+ <SMTPHost>mail.domain.com</SMTPHost>
+ <To>recipient_email at host.com</To>
+</appender></pre></div>
+
+<!--
<h3>DBAppender</h3>
<h3>SyslogAppender</h3>
- -->
+-->
</body>
</document>
\ No newline at end of file
More information about the logback-dev
mailing list