logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1484264 - /logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml
Date Sun, 19 May 2013 10:31:27 GMT
Author: rpopma
Date: Sun May 19 10:31:26 2013
New Revision: 1484264

URL: http://svn.apache.org/r1484264
Log:
Added example of how to add Log4jContextListener

Modified:
    logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml

Modified: logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml?rev=1484264&r1=1484263&r2=1484264&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml (original)
+++ logging/log4j/log4j2/trunk/web/src/site/xdoc/index.xml Sun May 19 10:31:26 2013
@@ -41,6 +41,12 @@
                   working directory of the running server.</li>
               </ol>
             </p>
+            <p>To register this listener, make sure that the log4j-web-2.0.jar file
is 
+            in the classpath (either in your web application's WEB-INF/lib directory 
+            or in the container's classpath) and add the following snippet to your web.xml:</p>
+            <pre>  &lt;listener&gt;
+    &lt;listener-class>org.apache.logging.log4j.core.web.Log4jContextListener&lt;/listener-class&gt;
+  &lt;/listener&gt;</pre>
           </subsection>
           <subsection name="JNDIContextFilter">
             <p>The JNDIContextFilter is a Servlet Filter that can be used in conjunction
with the JNDIContextSelector



Mime
View raw message