[logback-dev] svn commit: r1898 - logback/trunk/logback-site/src/site/pages

noreply.ceki at qos.ch noreply.ceki at qos.ch
Wed Oct 29 11:16:00 CET 2008


Author: ceki
Date: Wed Oct 29 11:16:00 2008
New Revision: 1898

Modified:
   logback/trunk/logback-site/src/site/pages/faq.html

Log:
- removing questions which are best answered in SLF4J
- added an entry about logger deserialization (related to LBCLASSIC-74 )

Modified: logback/trunk/logback-site/src/site/pages/faq.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/faq.html	(original)
+++ logback/trunk/logback-site/src/site/pages/faq.html	Wed Oct 29 11:16:00 2008
@@ -32,35 +32,36 @@
   <h3>Logback Classic</h3>
 
   
-  <ol type="1">
+  <ol type="1">    
     <li>
-      <a href="#setup_jetty">
-        How can I use logback-classic with Jetty ?
-              </a>
-    </li>
-    <li>
-      <a href="#auto_config">
-        How does the automatic configuration work?
-      </a>
-    </li>
+      <a href="#logger_serialization">Are logback loggers
+      serializable?</a>
+    </li>  
+
     <li>
-      <a href="#intercept_calls_tomcat">
-        How can I intercept JCL calls in Tomcat?
-      </a>
-    </li>
+      <a href="#auto_config">How does the automatic configuration
+      work?</a>
+    </li>  
     <li>
-      <a href="#intercept_calls_jetty">
-        How can I intercept JCL calls in Jetty ?
+      <a href="#setup_jetty">How can Jetty be instructed to use
+      logback-classic as its logging implementataion?
       </a>
     </li>
   </ol>
+
+  <!-- =============================================================== -->
+  <!-- =============================================================== -->
+  <!-- =============================================================== -->
+  <!-- =============================================================== -->
+
         
   <div class="section">
     <h2>Logback project</h2>
     
     <dl>
-      <dt> <a name="why_lgpl">Why is logback distributed under LGPL and
-    not the Apache Software License?</a>
+      <dt> 
+        <a name="why_lgpl" href="#why_lgpl">Why is logback distributed
+        under LGPL and not the Apache Software License?</a>
       </dt>
 
       <dd>
@@ -79,22 +80,66 @@
       </dd>
     </dl>
   </div>
+
   <div class="section">
     <h2>Logback-classic</h2>
     <dl>
+
+      <!-- ========================================================= -->
+
+      <dt>
+        <a name="auto_config" href="#auto_config">
+          How does the automatic configuration work?
+        </a>
+      </dt>
+      <dd>
+        <p>This question is answered in the <a
+        href="manual/joran.html#auto_configuration">relevant
+        section</a> of the logback manual.
+        </p>
+
+      </dd>
+
+      <hr/>
+      
+      <!-- ========================================================= -->
+      
+ 
+
+      <dt>
+        <a name="logger_serialization" href="#logger_serialization">
+          Are logback loggers serializable?</a>
+      </dt>
+      <dd>
+        <p>Yes. A logback logger <em>is</em> an SLF4J logger and SLF4J
+        loggers are serializable. This means that an object
+        referencing a logger will be alble to log after its
+        deserialization.
+        </p>
+
+        <p>The deserialized logger instance will be generated by
+        <code>org.slf4j.LoggerFactory</code>.  Thus, it is possible
+        for a logback logger to be deserialized as a log4j or j.u.l.
+        logger, depending on the deserialization environment.</p>
+      </dd>
+
+      <hr/>
+      <!-- ========================================================= -->
+
       <dt>
-        <a name="setup_jetty">
-          How can I use logback-classic with Jetty ?
+        <a name="setup_jetty"  href="#">
+          How can Jetty be instructed to use logback-classic as its
+          logging implementataion?
         </a>
       </dt>
+
       <dd>
         <p>The Jetty application server uses SLF4J for its internal
-        logging. Here are the required steps to install logback as
-        SLF4J's underlaying implementation.
+        logging.
         </p>
 
-        <p>A few jars must be present in the <em>JETTY_HOME/lib</em>
-        directory.
+        <p>The following jar files must be present in the
+        <em>JETTY_HOME/lib</em> directory.
         </p>
 
         <p>Logback-classic is based on the SLF4J api. Therefore, the
@@ -109,117 +154,21 @@
 
         <p> To configure logback-classic, a file called
         <em>logback.xml</em> should be placed in the
-        <em>JETTY_HOME/resources</em> directory. You can find
-        configuration samples in the
-        <em>examples/src/chapter4/conf/</em> directory, in the
-        distribution of logback.
+        <em>JETTY_HOME/resources</em> directory. You can find sample
+        configuration files in the
+        <em>logback-examples/src/main/java/chapter4/conf/</em> folder
+        shipping within the logback distribution.
         </p>
         
-        <table border="0">
-          <tr>
-            <td align="right">
-              <a href="#top">[top]</a>
-            </td>
-          </tr>
-        </table>
-        <hr />
-      </dd>
-      <dt>
-        <a name="auto_config">
-          How does the automatic configuration work?
-        </a>
-      </dt>
-      <dd>
-        <p>This question is answered in the <a
-        href="manual/joran.html#auto_configuration">relevant
-        section</a> of the logback manual.
-        </p>
-        <table border="0">
-          <tr>
-            <td align="right">
-              <a href="#top">[top]</a>
-            </td>
-                </tr>
-        </table>
-        <hr />
-      </dd>
-      <dt>
-        <a name="intercept_calls_tomcat">
-          How can I intercept JCL calls in Tomcat?
-        </a>
-      </dt>
-      <dd>
-        <p>When a dependency of your webapp logs using Jakarta Commons
-        Logging (for example Struts), you can intercept these calls
-        and redirect them to logback.
-        </p>
-        <p>This can be done by using <em>jcl104-over-slf4j.jar</em> ,
-        a module that is shipped with <a
-        href="http://www.slf4j.org">SLF4J</a> .
-        </p>
-        <p>If you have only one webapp, its <em>WEB-INF/lib</em>
-        directory should already contain the logback jars, namely
-        <em>logback-core-VERSION.jar</em> ,
-        <em>logback-classic-VERSION.jar</em> and
-        <em>slf4j-api-VERSION.jar</em> . A logback configuration file,
-        named <em>logback.xml</em> should be placed in the
-        <em>WEB-INF/classes/</em> directory.
-        </p>
-        <p>You now need to add <code>jcl104-over-slf4j.jar</code> to
-        your <em>WEB-INF/lib</em> directory and remove
-        <code>commons-logging-1.0.4.jar</code> . The logging that used
-        to be directed to JCL should now be handled by logback.
-        </p>
-
-        <p>In case several webapps share the logback jars, you might
-        place the previously mentionned jars in the
-        <em>common/lib/</em> directory of your Tomcat
-        installation. The <em>logback.xml</em> file should then be
-        placed in <em>common/classes</em> .
-        </p>
-        <table border="0">
-          <tr>
-            <td align="right">
-              <a href="#top">[top]</a>
-            </td>
-          </tr>
-        </table>
-        <hr />
-      </dd>
-      <dt>
-        <a name="intercept_calls_jetty">
-          How can I intercept JCL calls in Jetty ?
-        </a>
-      </dt>
-      <dd>
-        <p>Using logback as the logging implementation of choice for
-        frameworks depending on JCL can also be done in Jetty.
-        </p>
-        <p>In case you have only one webapp, the required steps are
-        exactly the same as <a href="#intercept_calls_tomcat">those
-        needed in Tomcat</a>.
-        </p>
-        <p>In case several webapps share the logback jars, you might
-        place the necessary jars in the <em>lib/</em> directory of
-        your Jetty installation. The <em>logback.xml</em> file should
-        then be placed in the <em>resources/</em> directory.
-        </p>
-        <p>However, due to <a
-        href="http://docs.codehaus.org/display/JETTY/Classloading">
-        Jetty's internal Classloading mechanism</a>, the
-        <em>logback-classic-VERSION.jar</em> and
-        <em>slf4j-api-VERSION.jar</em> files should also be placed in
-        the <em>WEB-INF/lib/</em> directory of your webapps.
-        </p>
-        <table border="0">
-          <tr>
-            <td align="right">
-              <a href="#top">[top]</a>
-            </td>
-          </tr>
-        </table>
       </dd>
+
+      <hr />
+
+
+    <!-- end of definitions -->
     </dl>
+
+
   </div>
 </div>
   


More information about the logback-dev mailing list