[logback-dev] svn commit: r1516 - in logback/trunk/logback-site/src/site: pages pages/manual pages/templates resources/manual/images resources/manual/images/chapter5
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Thu May 3 16:45:16 CEST 2007
Author: ceki
Date: Thu May 3 16:45:15 2007
New Revision: 1516
Added:
logback/trunk/logback-site/src/site/pages/templates/setup.js
logback/trunk/logback-site/src/site/resources/manual/images/htmlLayoutAccess.gif
- copied unchanged from r1501, /logback/trunk/logback-site/src/site/resources/manual/images/chapter5/htmlLayoutAccess.gif
Removed:
logback/trunk/logback-site/src/site/resources/manual/images/chapter5/htmlLayout1.gif
logback/trunk/logback-site/src/site/resources/manual/images/chapter5/htmlLayoutAccess.gif
Modified:
logback/trunk/logback-site/src/site/pages/bridge.html
logback/trunk/logback-site/src/site/pages/manual/appenders.html
logback/trunk/logback-site/src/site/pages/manual/architecture.html
logback/trunk/logback-site/src/site/pages/manual/contextSelector.html
logback/trunk/logback-site/src/site/pages/manual/filters.html
logback/trunk/logback-site/src/site/pages/manual/introduction.html
logback/trunk/logback-site/src/site/pages/manual/joran.html
logback/trunk/logback-site/src/site/pages/manual/layouts.html
logback/trunk/logback-site/src/site/pages/manual/mdc.html
logback/trunk/logback-site/src/site/pages/templates/creative.js
logback/trunk/logback-site/src/site/pages/templates/right.js
Log:
improved docs
Modified: logback/trunk/logback-site/src/site/pages/bridge.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/bridge.html (original)
+++ logback/trunk/logback-site/src/site/pages/bridge.html Thu May 3 16:45:15 2007
@@ -80,7 +80,7 @@
</p>
<p>We are happy to report that several applications are
- using log4j-bridge in production with success.
+ successfully using log4j-bridge in production.
</p>
@@ -91,10 +91,10 @@
bridge. For example, direct references to log4j appenders,
filters or PropertyConfigurator are not supported by log4j-bridge.
While the number of cases where log4j-bridge is insufficient is
- not negligible, in a large number of cases where log4j is
- configured through a configuration file, be it
+ not completely negligible, in a vast majority of cases where log4j
+ is configured through a configuration file, be it
<em>log4j.properties</em> or <em>log4j.xml</em>, log4j-bridge is
- sufficient to migrate your application to logback.
+ enough in order to migrate youran application to logback.
</p>
<h3>What about the overhead?</h3>
@@ -102,15 +102,13 @@
<p>There overhead of using log4j-bridge instead of log4j directly
is relatively small. Given that log4j-bridge immediately delegates
all work to logback, the CPU overhead should be negligible, in the
- order of a few <em>nanoseconds</em>, i.e. neglible. There memory
- overhead amount to an entry in a hasmap per logger, which should
- be usually acceptable even for very large applications consisting
- of several thousand loggers. Moreover, given that logback is both
+ order of a few <em>nanoseconds</em>. There is a memory overhead
+ corresponding to an entry in a hasmap per logger, which should be
+ usually acceptable even for very large applications consisting of
+ several thousand loggers. Moreover, given that logback is both
much faster and more memory-efficient, the gains made by using
logback should compensate for the overhead of using log4j-bridge
instead of log4j directly.</p>
-
-
<script src="templates/footer.js"></script>
Modified: logback/trunk/logback-site/src/site/pages/manual/appenders.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/appenders.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/appenders.html Thu May 3 16:45:15 2007
@@ -39,16 +39,7 @@
<script src="../templates/creative.js"></script>
-
- <div class="highlight">
- <p>
- In order to run the examples in this chapter, you need
- to make sure that certain jar files are present on the
- classpath.
- Please refer to the <a href="../setup.html">setup page</a>
- for further details.
- </p>
- </div>
+ <script src="../templates/setup.js"></script>
<h2>What is an Appender?</h2>
Modified: logback/trunk/logback-site/src/site/pages/manual/architecture.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/architecture.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/architecture.html Thu May 3 16:45:15 2007
@@ -767,15 +767,7 @@
log statements without the need to modify them manually.
</p>
- <div class="highlight">
- <p>
- In order to run the examples in this introduction, you need
- to make sure that certain jar files are present on the
- classpath.
- Please refer to the <a href="../setup.html">setup page</a>
- for further details.
- </p>
- </div>
+ <script src="../templates/setup.js"></script>
<p>The logback environment is fully configurable programmatically.
However, it is far more flexible to configure logback using
Modified: logback/trunk/logback-site/src/site/pages/manual/contextSelector.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/contextSelector.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/contextSelector.html Thu May 3 16:45:15 2007
@@ -35,13 +35,14 @@
<p>—KARL FRIEDRICH GAUSS, Letter to Bolyai, 1808.</p>
- <p>Style, like sheer silk, too often hides eczema.</p>
+ <p><em>Style, like sheer silk, too often hides eczema.</em></p>
<p>—ALBERT CAMUS, <em>The Fall</em></p>
</div>
<script src="../templates/creative.js"></script>
+ <script src="../templates/setup.js"></script>
<h3>Introduction</h3>
@@ -51,13 +52,15 @@
might reveal itself a tricky issue.
</p>
+
+
<p>Logback provides a simple yet powerful way of dealing with
multiple contexts, without corruption of data, nor collusion
between context instances.
</p>
<p>One thing we know is that JNDI environments are
- independant. Thus setting environment variables in each
+ independent. Thus setting environment variables in each
application will allow a given component to know which application
it is dealing with at the moment. This is basically the mechanism
that uses logback to provide easy access to the right
Modified: logback/trunk/logback-site/src/site/pages/manual/filters.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/filters.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/filters.html Thu May 3 16:45:15 2007
@@ -43,17 +43,9 @@
assembled or chained together to compose an arbitrarily complex
filtering policy.
</p>
-
- <div class="highlight">
- <p>
- In order to run the examples in this chapter, you need
- to make sure that certain jar files are present on the
- classpath.
- Please refer to the <a href="../setup.html">setup page</a>
- for further details.
- </p>
- </div>
-
+
+ <script src="../templates/setup.js"></script>
+
<p>
There are two main types of filters, namely <code>Filter</code> and
<code>TurboFilter</code>.
Modified: logback/trunk/logback-site/src/site/pages/manual/introduction.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/introduction.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/introduction.html Thu May 3 16:45:15 2007
@@ -59,15 +59,7 @@
<h2>First Baby Step</h2>
- <div class="highlight">
- <p>
- In order to run the examples in this introduction, you need
- to make sure that certain jar files are present on the
- classpath.
- Please refer to the <a href="../setup.html">setup page</a>
- for further details.
- </p>
- </div>
+ <script src="../templates/setup.js"></script>
<a name="Requirements"></a>
<h3>Requirements</h3>
Modified: logback/trunk/logback-site/src/site/pages/manual/joran.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/joran.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/joran.html Thu May 3 16:45:15 2007
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
-<title>Chapter3: Logback configuration</title>
+<title>Chapter3: Logback configuration & Joran</title>
<link rel="stylesheet" type="text/css" media="screen" href="../css/site.css" />
<link rel="stylesheet" type="text/css" media="print" href="../css/print.css" />
@@ -20,52 +20,42 @@
</div>
<div id="content">
- <h1>Chapter 3: Logback configuration with Joran</h1>
+ <h1>Chapter 3: Logback configuration & Joran</h1>
<div class="quote">
- <p>In symbols one observes an advantage in discovery which is
- greatest when they express the exact nature of a thing briefly
- and, as it were, picture it; then indeed the labor of thought is
- wonderfully diminished.
+ <p><em>In symbols one observes an advantage in discovery which
+ is greatest when they express the exact nature of a thing
+ briefly and, as it were, picture it; then indeed the labor of
+ thought is wonderfully diminished.</em>
</p>
<p>—GOTTFRIED WILHELM LEIBNIZ</p>
</div>
- <script src="../templates/creative.js"></script>
-
- <div class="highlight">
- <p>
- In order to run the examples in this chapter, you need
- to make sure that certain jar files are present on the
- classpath.
- Please refer to the <a href="../setup.html">setup page</a>
- for further details.
- </p>
- </div>
+ <script src="../templates/creative.js"></script>
+ <script src="../templates/setup.js"></script>
<p>Joran stands for a cold north-west wind which, every now and
- then, blows forcefully on Lake Leman, a.k.a lake Geneva. Located
+ then, blows forcefully on Lake Leman, a.k.a. lake Geneva. Located
right in the middle of Europe, the Leman lake happens to be the
continent's largest sweet water reserve.
</p>
<p>In the first part, we start by presenting ways for configuring
logback, with many example configuration scripts. In the <a
- href="#Joran"> second part</a>, we present Joran as a generic
- configuration framework, and how you can use it to configure your
- own applications.
+ href="#Joran">second part</a>, we present Joran, a generic
+ configuration framework, that you can put to use in order to
+ configure your own applications.
</p>
<h2>Configuration in logback</h2>
- <p>Logback can be configured both programmatically or with
- configuration script (in XML formal). Here are the steps that
- logback follows to try to configure itself:
+ <p>Logback can be configured either programmatically or with
+ configuration a script (expressed in XML format). Here are the
+ initialization steps that logback follows to try to configure
+ itself:
</p>
-
-
<ol>
<li>
<p>Logback tries to find a file called <em>logback-test.xml</em>
@@ -79,14 +69,13 @@
<li><p>In case neither file is found, logback configures itself
automatically using the <a
href="../xref/ch/qos/logback/classic/BasicConfigurator.html"><code>BasicConfigurator</code></a>
- which will direct logging output on the console. </a></p>
+ which will cause output to be directed on the console. </a></p>
</li>
</ol>
- <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
-
- <p>The last step is meant to provide basic logging functionnality
- in case no configuration file is provided.
+ <p>The third and last step is meant to provide a default (but very
+ basic) logging functionnality in case no configuration file could
+ be found.
</p>
@@ -101,10 +90,10 @@
<h3>Automatically configuring logback</h3>
- <p>The simplest way to configure logback is by letting logback use
- its <code>BasicConfigurator.configureDefaultContext()</code>
- method. Let us give a taste of how this is done with the help of
- an imaginary application called <code>MyApp1</code>.
+ <p>The simplest way to configure logback is by letting logback
+ fallback to its default configuration. Let us give a taste of how
+ this is done in an imaginary application called
+ <code>MyApp1</code>.
</p>
<em>Example 3.1: Simple example of <code>BasicConfigurator</code> usage
@@ -126,59 +115,61 @@
}
}</pre></div>
-<p>
-There is no invokation of the <code>BasicConfigurator</code> here, since logback
-automatically calls it when no configuration files are found. It creates a rather
-simple logback setup. This call is hardwired to add a <code>ConsoleAppender</code> to
-the root logger. The output is formatting using a <code>PatternLayout</code> set to the
-pattern <em>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</em>. Note that
-by default the root logger is assigned to the <code>DEBUG</code> level.
-</p>
-
-<p>
-The output of the command <em>java chapter3.MyApp1</em> should be similar to:
-</p>
+ <p>Assuming the default configuration files
+ <em>logback-test.xml</em> and <em>logback.xml</em> could not be
+ found, logback will default to a minimal configuration hardwired
+ to add a <code>ConsoleAppender</code> to the root logger. The
+ output is formatted using a <code>PatternLayout</code> set to the
+ pattern <em>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
+ %msg%n</em>. Moreover, by default the root logger is assigned to
+ the <code>DEBUG</code> level.
+ </p>
+
+ <p>The output of the command <em>java chapter3.MyApp1</em> should
+ be similar to:
+ </p>
<div class="source"><pre>16:06:09.031 [main] INFO chapter3.MyApp1 - Entering application.
16:06:09.046 [main] DEBUG chapter3.Foo - Did it again!
16:06:09.046 [main] INFO chapter3.MyApp1 - Exiting application.</pre></div>
-<p>
-If you are unable to run this command, then make sure that you have set
-your classpath correctly. The scripts provided in the
-<em>logback-examples/</em> directory will help you setting it up.
-</p>
-
-<p>
-As a side note, let us mention that in logback child loggers link only
-to their existing ancestors. In particular, the logger named <em>chapter3.Foo</em>
-is linked directly with the root logger, thereby circumventing the unused
-<em>chapter3</em> logger. This noticeably improves the performance
-of hierarchy walks and also slightly reduces logback's memory footprint
-</p>
+ <p>If you are unable to run this command, then make sure that you
+ have set your classpath correctly. The scripts provided in the
+ <em>logback-examples/</em> directory should help you get started.
+ </p>
+
+ <script src="../templates/setup.js"></script>
+
+ <p>The <code>MyApp1</code> application links to logback through
+ calls <code>org.slf4j.LoggerFactory</code> and
+ <code>org.slf4j.Logger</code> classes, retrieve the loggers it
+ wishes to use, and chugs on. For example, the only dependence of
+ the <code>Foo</code> class on logback are through
+ <code>org.slf4j.LoggerFactory</code> and
+ <code>org.slf4j.Logger</code> imports. Except code that configures
+ logback (if such code exists) user code does not need to depend on
+ logback. Given that SLF4J permits the use of any implementation
+ under its abstraction layer, it is rather easy to migrate large
+ bodies of code from an implementation to another. Logback also
+ ships with a module called <em>log4j-bridge</em> which intercepts
+ log4j calls and redirects them to the corresponding logback
+ components. With the help of <em>log4j-bridge</em> , you can
+ migrate an entire application using log4j to logback just by
+ replacing jars. More information about the <em>log4j-bridge</em>
+ module can be found on a <a href="../bridge.html">separate
+ page</a>.
+ </p>
+
+ <h3>The same with <code>JoranConfigurator</code></h3>
+
+ <p>The previous example outputs logging information always in the
+ same fixed manner. How boring! It takes few easy steps to modify
+ <code>MyApp1</code> so that the log output can be controlled at
+ runtime. Here is a slightly modified version called
+ <code>MyApp2</code>.
+ </p>
-<p>
-The <code>MyApp1</code> class uses logback by calling the org.slf4j.LoggerFactory and
-org.slf4j.Logger classes, retrieve the loggers it wishes to use, and log away.
-For example, the only dependence of the <code>Foo</code> class on logback is the
-org.slf4j.LoggerFactory and org.slf4j.Logger import.
-Except code that configures logback (if such code exists) user code does not need to
-depend on logback. Given that SLF4J permits the use of any implementation under its
-abstraction layer, it is rather easy to migrate large bodies of code from an implementation
-to another. Logback also ships with a module called <em>log4j-bridge</em> that intercepts
-log4j calls and redirects them to the corresponding logback components. Thank to that module,
-one can migrate an entire application using log4j to logback just by replacing jars. More
-information about the <em>log4j-bridge</em> module in its
-<a href="../bridge.html">specific documentation page</a>.
-</p>
-
-<h3>The same using <code>JoranConfigurator</code></h3>
-
-<p>
-The previous example outputs logging information always in the same fixed manner.
-Fortunately, it is easy to modify <code>MyApp1</code> so that the log output can
-be controlled at runtime. Here is a slightly modified version called <code>MyApp2</code>.
-</p>
+<!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxx -->
<em>Example 3.2: Simple example of <code>BasicConfigurator</code> usage <a href="../xref/chapter3/MyApp2.html">(logback-examples/src/main/java/chapter3/MyApp2.java)</a></em>
<div class="source"><pre>package chapter3;
@@ -189,6 +180,7 @@
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException;
+import ch.qos.logback.core.util.StatusPrinter;
public class MyApp2 {
final static Logger logger = LoggerFactory.getLogger(MyApp2.class);
@@ -197,12 +189,12 @@
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
try {
- <b>JoranConfigurator configurator = new JoranConfigurator();
+<b> JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(lc);
lc.shutdownAndReset();
configurator.doConfigure(args[0]);</b>
} catch (JoranException je) {
- je.printStackTrace();
+ StatusPrinter.print(lc);
}
logger.info("Entering application.");
Modified: logback/trunk/logback-site/src/site/pages/manual/layouts.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/layouts.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/layouts.html Thu May 3 16:45:15 2007
@@ -31,16 +31,8 @@
</div>
<script src="../templates/creative.js"></script>
-
- <div class="highlight">
-
- <p>In order to run the examples in this chapter, you need to make
- sure that certain jar files are present on the classpath. Please
- refer to the <a href="../setup.html">setup page</a> for further
- details.
- </p>
- </div>
-
+ <script src="../templates/setup.js"></script>
+
<h2>What is a layout?</h2>
<p>While appenders are responsible for writing logging output to
@@ -287,7 +279,7 @@
</p>
- <a name="PatternLayout"></a>
+ <a name="ClassicPatternLayout"></a>
<h3>PatternLayout</h3>
<p>
@@ -1351,40 +1343,86 @@
<p>Here is a sample output produced by <code>HTMLLayout</code>
using its default CSS stylesheet:</p>
- <img src="images/chapter5/htmlLayout1.gif" alt="HTML Layout Sample Image"/>
+ <img src="images/htmlLayout0.gif" alt="HTML Layout Sample Image"/>
<p>The content of table columns are specified with the help of a
conversion pattern. See <a
- href="#PatternLayout"><code>PatternLayout</code></a> for
- documentation on conversion patterns. Thus, the user has full
- control over the contents and format of the table. You can display
- any one of the converters <code>PatternLayout</code> knows about.
+ href="#ClassicPatternLayout"><code>PatternLayout</code></a> for
+ documentation on conversion patterns. As such, you have full
+ control over the contents and format of the table. You can select
+ and display any combination of converters
+ <code>PatternLayout</code> knows about.
</p>
- <p>One notable point about the use of <code>PatternLayout</code>
- with <code>HTMLLayout</code> is that conversion specifiers should
- not be separated by a space or in general any literals. Each
- specifier found in the pattern will result in a separate column,
- in particular each literal in the pattern.
+ <p>One notable exception about the use of
+ <code>PatternLayout</code> with <code>HTMLLayout</code> is that
+ conversion specifiers should not be separated by space characters
+ or more generally by literal text. Each specifier found in the
+ pattern willa result in a separate column, in particular for each
+ literal text in the pattern, wasting valuable real estate on your
+ screen.
</p>
- <p>The pattern <em>%ex</em> used to display exceptions is not the
- only way to display them. If you use the <em>%em</em> conversion
- word, a table column will be created to display exception stack
- traces. In most cases the column will be empty, wasting valuable
- real-estate on your screen.
+ <p>Here is simple but functional configuration file illustrating
+ the use of <code>HTMLLayout</code>.
+ </p>
+
+<div class="source"><configuration debug="true">
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <layout class="ch.qos.logback.classic.html.HTMLLayout">
+ <b><pattern>%relative%thread%mdc%level%logger%msg</pattern></b>
+ </layout>
+ <File>/test.html</File>
+ </appender>
+
+ <root>
+ <level value="debug" />
+ <appender-ref ref="FILE" />
+ </root>
+</configuration>
+</div>
+
+ <p>Launching the <code>TrivialMain</code> application listed below
+ will create the file <em>test.html</em> on your local drive.</p>
+
+<div class="source">import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TrivialMain {
+ public static void main(String[] args) throws InterruptedException {
+ Logger logger = LoggerFactory.getLogger(TrivialMain.class);
+ for(int i = 0; i < 6; i ++) {
+ if(i % 5 == 0) {
+ logger.info("an info message "+i);
+ } else {
+ logger.debug("hello world number" +i);
+ }
+ }
+ logger.error("Finish off with fireworks", new Exception("Just testing"));
+ }
+}</div>
+
+ <p>The contents of <em>test.html</em> should be similar to:
</p>
+ <img src="images/htmlLayout1.jpg" alt="HTML Layout Sample Image"/>
- <p>
- Moreover, printing a stack trace on a separate column does yield
- very readable results. A better solution is available in the
- form of implementations of the <code>IThrowableRenderer</code>
- interface. Such an implementation can assigned to
- <code>HTMLLayout</code> to manage the display data related to
- exceptions. By default, a
- <a href="../xref/ch/qos/logback/classic/html/DefaultThrowableRenderer.html">
+ <h3>Stack traces</h3>
+
+ <p> If you use the <em>%em</em> conversion word, to display stack
+ traces, a table column will be created to display exception stack
+ traces. In most cases the column will be empty, wasting screen
+ real-estate. Moreover, printing a stack trace on a separate column
+ does yield very readable results. Fortunately, the <em>%ex</em>
+ conversion word is not the only way to display stack traces.
+ </p>
+
+ <p>A better solution is available through implementations of
+ <code>IThrowableRenderer</code> interface. Such an implementation
+ can assigned to <code>HTMLLayout</code> to manage the display data
+ related to exceptions. By default, a
+ <a href="../xref/ch/qos/logback/classic/html/DefaultThrowableRenderer.html">
<code>DefaultThrowableRenderer</code></a> is assigned to each
- <code>HTMLLayout</code> isntance. It writes exceptions on a
+ <code>HTMLLayout</code> instance. It writes exceptions on a
<em>new table row</em>, along with its stacktrace, in an easily
readable manner, as shown on the figure above.
</p>
@@ -1394,25 +1432,30 @@
<a href="../xref/ch/qos/logback/core/html/NOPThrowableRenderer.html">
<code>NOPThrowableRenderer</code></a> in the configuration file
in order to disable displaying a separate row for the stack
- trace.
+ trace. We don't have the faintest idea why you would want to do
+ that, but if you did, you could.
</p>
- <p>A user-specified external CSS file can be set as the
- style-sheet of the HTML output. For this purpose, a
- <code>cssBuilder</code> xml element can be nested within a
- <code><layout></code> element, as shown below.
+ <h3>CSS</h3>
+
+ <p>The presentation of the HTML created by <code>HTMLLayout</code>
+ is controlled through a Cascading Style Sheet (CSS). In the
+ absence of specific instructions, <code>HTMLLayout</code> will
+ default to its internal CSS. However, your can instruct
+ <code>HTMLLayout</code> you use an external CSS file. For this
+ purpose, a <code>cssBuilder</code> element can be nested within a
+ <code><layout></code> element, as shown below.
</p>
<div class="source"><pre><layout>
...
<cssBuilder class="ch.qos.logback.core.html.UrlCssBuilder">
- <param name="url" value="path_to_StyleFile.css" />
+ <url>path_to_StyleFile.css</url>
</cssBuilder>
...
</layout></pre></div>
- <p>By default, an internal CSS style is used.</p>
-
+
<p>The <code>HTMLLayout</code> is often used in conjunction with
<code>SMTPAppender</code>, in order to send an email pleasantly
formatted in HTML. Here is a typical configuration:
@@ -1421,12 +1464,12 @@
<div class="source"><pre><configuration>
<appender name="SMTP" class="ch.qos.logback.classic.net.SMTPAppender">
<layout class="ch.qos.logback.classic.html.HTMLLayout">
- <param name="pattern" value="%relative%thread%mdc%level%class%msg" />
+ <pattern>%relative%thread%mdc%level%class%msg</pattern>
</layout>
- <param name="From" value="sender.email at domain.net" />
- <param name="SMTPHost" value="mail.domain.net" />
- <param name="Subject" value="LastEvent: %class - %msg" />
- <param name="To" value="destination.email at domain.net" />
+ <From>sender.email at domain.net</From>
+ <SMTPHost>mail.domain.net"</SMTPHost>
+ <Subject>LastEvent: %class - %msg </Subject>
+ <To>destination.email at domain.net</To>
</appender>
<root>
@@ -1772,10 +1815,12 @@
<a name="AccessHTMLLayout"></a>
<h3>HTMLLayout</h3>
- <p>The access version of
- <a href="../xref/ch/qos/logback/access/html/HTMLLayout.html">
- <code>HTMLLayout</code></a> works like logback classic's
- version.</p>
+ <p>The <a
+ href="../xref/ch/qos/logback/access/html/HTMLLayout.html"><code>HTMLLayout</code></a>
+ class found in logback-access is similar to the <a
+ href="#ClassicHTMLLayout"><code>HTMLLayout</code></a> class found
+ in logback-classic.
+ </p>
<p>By default, it will create a table containing the following data:</p>
Modified: logback/trunk/logback-site/src/site/pages/manual/mdc.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/mdc.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/mdc.html Thu May 3 16:45:15 2007
@@ -40,23 +40,16 @@
and considerably increases their management overhead.
</p>
- <div class="highlight">
- <p>
- In order to run the examples in this chapter, you need
- to make sure that certain jar files are present on the
- classpath.
- Please refer to the <a href="../setup.html">setup page</a>
- for further details.
- </p>
- </div>
+ <script src="../templates/setup.js"></script>
+
- <p>
- A lighter technique consists of uniquely stamping each
- log request servicing a given client. Neil Harrison described this method in the book
- <em>Patterns for Logging Diagnostic Messages</em> in
- Pattern Languages of Program Design 3, edited by R. Martin, D. Riehle,
- and F. Buschmann (Addison-Wesley, 1997). Logback offers a variant of this technique:
- Mapped Diagnostic Contexts (MDC).
+ <p>A lighter technique consists of uniquely stamping each log
+ request servicing a given client. Neil Harrison described this
+ method in the book <em>Patterns for Logging Diagnostic
+ Messages</em> in Pattern Languages of Program Design 3, edited by
+ R. Martin, D. Riehle, and F. Buschmann (Addison-Wesley,
+ 1997). Logback offers a variant of this technique: Mapped
+ Diagnostic Contexts (MDC).
</p>
<p>
Modified: logback/trunk/logback-site/src/site/pages/templates/creative.js
==============================================================================
--- logback/trunk/logback-site/src/site/pages/templates/creative.js (original)
+++ logback/trunk/logback-site/src/site/pages/templates/creative.js Thu May 3 16:45:15 2007
@@ -5,7 +5,7 @@
document.write(' <p class="author">');
document.write(' Authors: Ceki Gülcü, Sébastien Pennec');
document.write(' <br/>');
-document.write(' Copyright © 2000-2006, QOS.ch</p>');
+document.write(' Copyright © 2000-2007, QOS.ch</p>');
document.write(' </td>');
document.write(' <td>');
document.write(' <a rel="license"');
Modified: logback/trunk/logback-site/src/site/pages/templates/right.js
==============================================================================
--- logback/trunk/logback-site/src/site/pages/templates/right.js (original)
+++ logback/trunk/logback-site/src/site/pages/templates/right.js Thu May 3 16:45:15 2007
@@ -3,8 +3,9 @@
document.write('<p class="menu_header">New and noteworthy</p>')
-document.write('<p class="menu"><a href="http://xhab.blogspot.com/2007/03/new-logging-experience.html">A new logging experience!</a>')
+document.write('<p class="menu"><a href="http://www.javadonkey.com/blog/log4j-isdebugenabled-logback/">isDebugEnabled()</a>')
+document.write('<p class="menu"><a href="http://xhab.blogspot.com/2007/03/new-logging-experience.html">A new logging experience!</a>')
document.write('<p class="menu"><a href="http://javablog.smilehouse.com/blog/default/Java/2007/02/02/Writing-rotated-and-compressed-access-logs-with-logback">Writing rotated and compressed access logs</a>')
Added: logback/trunk/logback-site/src/site/pages/templates/setup.js
==============================================================================
--- (empty file)
+++ logback/trunk/logback-site/src/site/pages/templates/setup.js Thu May 3 16:45:15 2007
@@ -0,0 +1,10 @@
+
+document.write(' <div class="highlight">');
+document.write(' <p>');
+document.write(' In order to run the examples in this chapter, you need');
+document.write(' to make sure that certain jar files are present on the');
+document.write(' classpath.');
+document.write(' Please refer to the <a href="../setup.html">setup page</a>');
+document.write(' for further details.');
+document.write(' </p>');
+document.write(' </div>');
\ No newline at end of file
More information about the logback-dev
mailing list