[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.25-37-gf8db9f8

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Mon Nov 22 19:22:51 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".

The branch, master has been updated
       via  f8db9f855682bca4c73856893ace329730ff7b9c (commit)
      from  191fe722b5ef50af18600d94f6dfaa23eaf510f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=f8db9f855682bca4c73856893ace329730ff7b9c
http://github.com/ceki/logback/commit/f8db9f855682bca4c73856893ace329730ff7b9c

commit f8db9f855682bca4c73856893ace329730ff7b9c
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Mon Nov 22 19:21:57 2010 +0100

    ow

diff --git a/logback-site/src/site/pages/access.html b/logback-site/src/site/pages/access.html
index 3a0055c..f81adaa 100644
--- a/logback-site/src/site/pages/access.html
+++ b/logback-site/src/site/pages/access.html
@@ -4,7 +4,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
-    <title>Logback Access</title>
+    <title>Logback-access</title>
     <link rel="stylesheet" type="text/css" href="css/common.css" />
     <link rel="stylesheet" type="text/css" href="css/screen.css" media="screen" />
     <link rel="stylesheet" type="text/css" href="css/_print.css" media="print" />
@@ -19,7 +19,7 @@
     </div>
     <div id="content">  
 	
-    <h2>Access log with logback, Jetty and Tomcat</h2>
+    <h2>HTTP-access logs with logback-access, Jetty and Tomcat</h2>
 
     <div class="author">
 			Authors: Ceki G&#252;lc&#252;, S&#233;bastien Pennec
@@ -30,16 +30,17 @@
 
 		<h1>Introduction</h1>
 
-    <p>The logback-access module integrates with Servlet containers
-    such as Jetty or Tomcat to provide rich and powerful HTTP-access
-    log functionality.
+    <p>The logback-access module, part of the standard logback
+    distribution, integrates with Servlet containers such as Jetty or
+    Tomcat to provide rich and powerful HTTP-access log functionality.
     </p>
 		
 		<p>Logback was designed as a modular framework from the
 		start. Making logback-core reusable under different circumstances
 		without much recoding was one of our main goals. In accordance
-		with this strategy, logback-access builds on top of
-		logback-core. </p>
+		with this strategy, logback-access builds on top of logback-core
+		and can thus provide much of the functionality of logback-classic
+		but in the scope of HTPP-access logging. </p>
 
     <a name="tomcat"></a>
 		<h1>Logback-access under Tomcat</h1>
@@ -496,9 +497,9 @@ CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/mx4j-impl.jar</pre></div>
 
   <pre class="prettyprint source">&lt;configuration&gt;
   &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
-    &lt;layout class="ch.qos.logback.access.PatternLayout"&gt;      
-      &lt;Pattern&gt;%fullRequest%n%n%fullResponse&lt;/Pattern&gt;
-    &lt;/layout&gt;
+    &lt;encoder&gt;      
+      &lt;pattern&gt;%fullRequest%n%n%fullResponse&lt;/pattern&gt;
+    &lt;/encoder&gt;
   &lt;/appender&gt;
 	
   &lt;appender-ref ref="STDOUT" /&gt;
@@ -549,7 +550,7 @@ Set-Cookie: JSESSIONID=bgebt99ce9om;path=/logback-demo
   supports <code>includes</code> and <code>excludes</code> parameters.
   <code>TeeFilter</code> will be active if the current host is listed
   in the includes list and absent in the excludes list. An empty
-  includes list is interepreted as to contain all possible host names
+  includes list is interpreted as to contain all possible host names
   in the universe.
   </p>
 
@@ -560,8 +561,8 @@ Set-Cookie: JSESSIONID=bgebt99ce9om;path=/logback-demo
   &lt;filter-name>TeeFilter&lt;/filter-name>
   &lt;filter-class>ch.qos.logback.access.servlet.TeeFilter&lt;/filter-class>
   &lt;init-param>
-    &lt;param-name>includes&lt;/param-name>
-    &lt;param-value>orion, gemini&lt;/param-value>
+    <b>&lt;param-name>includes&lt;/param-name></b>
+    <b>&lt;param-value>orion, gemini&lt;/param-value></b>
   &lt;/init-param>
 &lt;/filter>  </pre>
 
@@ -572,8 +573,8 @@ Set-Cookie: JSESSIONID=bgebt99ce9om;path=/logback-demo
   &lt;filter-name>TeeFilter&lt;/filter-name>
   &lt;filter-class>ch.qos.logback.access.servlet.TeeFilter&lt;/filter-class>
   &lt;init-param>
-    &lt;param-name>excludes&lt;/param-name>
-    &lt;param-value>orion, gemini&lt;/param-value>
+    <b>&lt;param-name>excludes&lt;/param-name></b>
+    <b>&lt;param-value>orion, gemini&lt;/param-value></b>
   &lt;/init-param>
 &lt;/filter>  </pre>
     
diff --git a/logback-site/src/site/pages/manual/configuration.html b/logback-site/src/site/pages/manual/configuration.html
index 8d5bd64..ce31db1 100644
--- a/logback-site/src/site/pages/manual/configuration.html
+++ b/logback-site/src/site/pages/manual/configuration.html
@@ -1485,8 +1485,8 @@ fileName=myApp.log
   href="#definingPropsOnTheFly">Defining properties on the
   fly</a></h3>
 
-  <p>You may define properties from within the configuration file
-  using the <code>&lt;define></code> element. The define element takes
+  <p>You may define properties dynamically using the
+  <code>&lt;define></code> element. The define element takes two
   mandatory attributes: <span class="attr">name</span> and <span
   class="attr">class</span>. The <span class="attr">name</span>
   attribute designates the name of the property to set whereas the
@@ -1494,8 +1494,8 @@ fileName=myApp.log
   implementing the <a
   href="../xref/ch/qos/logback/core/spi/PropertyDefiner.html">PropertyDefiner</a>
   interface. The value returned by the <code>getPropertyValue</code>()
-  method of the <code>PropertyDefiner</code> will be placed into the
-  named property.
+  method of the <code>PropertyDefiner</code> instance will be the
+  value of the named property.
   </p>
 
   <p>Here is an example.</p>
diff --git a/logback-site/src/site/pages/recipes/captureHttp.html b/logback-site/src/site/pages/recipes/captureHttp.html
new file mode 100644
index 0000000..5e53d1b
--- /dev/null
+++ b/logback-site/src/site/pages/recipes/captureHttp.html
@@ -0,0 +1,157 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+    <title>Catpuring HTTP communications</title>
+    <link rel="stylesheet" type="text/css" href="../css/common.css" />
+    <link rel="stylesheet" type="text/css" href="../css/screen.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="../css/_print.css" media="print" />
+    <link rel="stylesheet" type="text/css" href="../css/prettify.css" media="screen" />
+
+  </head>
+  <body onload="prettyPrint()">
+    <script type="text/javascript">prefix='../';</script>
+    <script type="text/javascript" src="../js/prettify.js"></script>
+    <script src="../templates/header.js" type="text/javascript"></script>
+    <div id="left">
+      <noscript>Please turn on Javascript to view this menu</noscript>
+      <script src="../templates/left.js" type="text/javascript"></script>
+    </div>
+    <div id="content">
+      
+      <h2>Capturing incoming HTTP requests and outgoing responses</h2>
+
+      <p>Logback ships with a module called logback-access which
+      integrates with Servlet containers such as Jetty or Tomcat to
+      provide rich and powerful HTTP-access log functionality.
+      </p>
+
+      <p>When diagnosing issues in a web-application, it is very
+      helpful to be able to capture incoming HTTP requests and the
+      outgoing response. This is particularly true for a
+      web-applications offering web-services using <a
+      href="http://en.wikipedia.org/wiki/SOAP">SOAP</a>. Having access
+      to the "raw" SOAP message makes it much easier to diagnose
+      errors caused by misspelled namespaces or missing fields.
+      </p>
+
+      <p>Certain Web-Service stacks can be easily configured to log
+      the SOAP traffic. For instance, with JBoss' Web-services stack,
+      you can set the level of the
+      <code>org.jboss.ws.core.MessageTrace</code> logger to
+      <code>TRACE</code> in order to enable SOAP message tracing as <a
+      href="http://community.jboss.org/wiki/JBossWS-Log4j">documented
+      in the Jboss wiki</a>.
+      </p>
+
+      <p>If you are using a different Web-Services stack, e.g. Metro,
+      it might not be very convenient to enable SOAP message
+      tracing. In that case, and assuming you application is deployed
+      on Tomcat, you might want to enable <a
+      href="http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Request_Dumper_Filter">RequestDumperFilter</a>.
+      Unfortunately, not only is <code>RequestDumperFilter</code>
+      rather hard to install, it does not dump the payload of the
+      incoming request nor the outgoing response.
+      </p>
+
+      <p>With help of logback-access and the <a
+      href="../access.html#teeFilter">TeeFilter</a> you can capture
+      the full input and output for each request as explained below.
+  
+      </p>
+
+      <h3>Capturing</h3>
+
+      <p>The <code>TeeFilter</code>, as any other servlet filter needs
+      to be declared in your web-application's <em>web.xml</em>
+      file. Here is the decleration to add to your web-application's
+      <em>web.xml</em> file.
+      </p>
+
+    <pre class="prettyprint source">&lt;filter&gt;
+  &lt;filter-name&gt;TeeFilter&lt;/filter-name&gt;
+  &lt;filter-class&gt;ch.qos.logback.access.servlet.TeeFilter&lt;/filter-class&gt;
+&lt;/filter&gt;
+
+&lt;filter-mapping&gt;
+  &lt;filter-name&gt;TeeFilter&lt;/filter-name&gt;
+  &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
+&lt;/filter-mapping&gt;</pre>
+
+      <p>The <code>TeeFilter</code> requires the logback-access module
+      to be installed in your web-server. The installation of
+      logback-access is explained <a
+      href="../access.html">elsewhere</a>. Once you have installed
+      logback-access into your Servlet container, e.g. Tomcat or
+      Jetty, you can configure logback-access according to your wishes
+      with the help of a configuration file named
+      <em>logback-access.xml</em>.
+      </p>
+      
+      <p>Here is a sample <em>logback-access.xml</em> configuration
+      file which will output the full contents of the request and
+      response on the console.
+      </p>
+
+  <pre class="prettyprint source">&lt;configuration&gt;
+  &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
+    &lt;layout class="ch.qos.logback.access.PatternLayout"&gt;      
+      &lt;pattern&gt;%fullRequest%n%n%fullResponse&lt;/pattern&gt;
+    &lt;/layout&gt;
+  &lt;/appender&gt;
+	
+  &lt;appender-ref ref="STDOUT" /&gt;
+&lt;/configuration&gt;</pre>
+      
+     <p>Here is the output generated when accessing the <a
+     href="../demo.html">logback-demo</a> application configured as shown
+     above, yields:</p>
+
+     <p class="source"><b>GET /logback-demo/index.jsp HTTP/1.1</b>
+Host: localhost:8080
+User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20070312 Firefox/1.5.0
+Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8
+Accept-Language: en-us,en;q=0.5
+Accept-Encoding: gzip,deflate
+Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+Keep-Alive: 300
+Connection: keep-alive
+Referer: http://localhost:8080/logback-demo/login.jsp
+Cookie: JSESSIONID=15c7tqi9ehlwk;  OID324nkzcmr=null; OID32862zgoa=null; 
+
+
+
+<b>HTTP/1.1 200 OK</b>
+Content-Type: text/html; charset=iso-8859-1
+Expires: Thu, 01 Jan 1970 00:00:00 GMT
+Set-Cookie: JSESSIONID=bgebt99ce9om;path=/logback-demo
+
+
+&lt;html&gt;
+&lt;head&gt;
+        &lt;LINK REL=StyleSheet HREF="css/pk.css" /&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;h2&gt;Logback demo center&lt;/h2&gt;
+
+[snip, so that text is reasonably sized]</p>
+
+<p>&nbsp;</p>
+
+      <p>
+      </p>
+
+
+      <h3>Enabling only in the integration environment</h3>
+
+      <h3>Filtering captured requests</h3>
+
+      
+      <script src="../templates/footer.js" type="text/javascript"></script>	
+    </div>
+  </body>
+</html>
+ 
\ No newline at end of file
diff --git a/logback-site/src/site/pages/recipes/index.html b/logback-site/src/site/pages/recipes/index.html
index d2d24d5..84dc02b 100644
--- a/logback-site/src/site/pages/recipes/index.html
+++ b/logback-site/src/site/pages/recipes/index.html
@@ -29,9 +29,14 @@
           <li><p><a href="emailPerTransaction.html">send an email per
           transaction but only for certain users</a></p></li>
         </ul>
-      </div> 
 
 
+        <ul>
+          <li><p><a href="captureHttp.html">Capture incoming HTTP
+          requests and outgoing responses</a></p></li>
+        </ul> 
+      </div>
+
       <script src="../templates/footer.js" type="text/javascript"></script>	
     </div>
   </body>

-----------------------------------------------------------------------

Summary of changes:
 logback-site/src/site/pages/access.html            |   31 ++--
 .../src/site/pages/manual/configuration.html       |    8 +-
 .../src/site/pages/recipes/captureHttp.html        |  157 ++++++++++++++++++++
 logback-site/src/site/pages/recipes/index.html     |    7 +-
 4 files changed, 183 insertions(+), 20 deletions(-)
 create mode 100644 logback-site/src/site/pages/recipes/captureHttp.html


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list