cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1069321 - in /cxf/branches/2.3.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/interceptor/
Date Thu, 10 Feb 2011 10:11:54 GMT
Author: ningjiang
Date: Thu Feb 10 10:11:54 2011
New Revision: 1069321

URL: http://svn.apache.org/viewvc?rev=1069321&view=rev
Log:
Merged revisions 1069318 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1069318 | ningjiang | 2011-02-10 18:05:41 +0800 (Thu, 10 Feb 2011) | 1 line
  
  CXF-3325 Logging interceptors should show the HTTP method
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 10 10:11:54 2011
@@ -1 +1 @@
-/cxf/trunk:1068320,1068337,1068525,1068867,1068877,1069249
+/cxf/trunk:1068320,1068337,1068525,1068867,1068877,1069249,1069318

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java?rev=1069321&r1=1069320&r2=1069321&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
Thu Feb 10 10:11:54 2011
@@ -94,6 +94,10 @@ public class LoggingInInterceptor extend
         if (encoding != null) {
             buffer.getEncoding().append(encoding);
         }
+        String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);
+        if (httpMethod != null) {
+            buffer.getHttpMethod().append(httpMethod);
+        }
         String ct = (String)message.get(Message.CONTENT_TYPE);
         if (ct != null) {
             buffer.getContentType().append(ct);

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java?rev=1069321&r1=1069320&r2=1069321&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingMessage.java
Thu Feb 10 10:11:54 2011
@@ -28,6 +28,7 @@ public final class LoggingMessage {
     private final StringBuilder address;
     private final StringBuilder contentType;
     private final StringBuilder encoding;
+    private final StringBuilder httpMethod;
     private final StringBuilder header;
     private final StringBuilder message;
     private final StringBuilder payload;
@@ -42,6 +43,7 @@ public final class LoggingMessage {
         contentType = new StringBuilder();
         address = new StringBuilder();
         encoding = new StringBuilder();
+        httpMethod = new StringBuilder();
         header = new StringBuilder();
         message = new StringBuilder();
         payload = new StringBuilder();
@@ -64,6 +66,10 @@ public final class LoggingMessage {
     public StringBuilder getHeader() {
         return header;
     }
+    
+    public StringBuilder getHttpMethod() {
+        return httpMethod;
+    }
 
     public StringBuilder getContentType() {
         return contentType;
@@ -97,6 +103,10 @@ public final class LoggingMessage {
             buffer.append("\nEncoding: ");
             buffer.append(encoding);
         }
+        if (httpMethod.length() > 0) {
+            buffer.append("\nHttp-Method: ");
+            buffer.append(httpMethod);
+        }
         buffer.append("\nContent-Type: ");
         buffer.append(contentType);
         buffer.append("\nHeaders: ");

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java?rev=1069321&r1=1069320&r2=1069321&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
Thu Feb 10 10:11:54 2011
@@ -106,7 +106,10 @@ public class LoggingOutInterceptor exten
             if (encoding != null) {
                 buffer.getEncoding().append(encoding);
             }            
-            
+            String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);
+            if (httpMethod != null) {
+                buffer.getHttpMethod().append(httpMethod);
+            }
             String address = (String)message.get(Message.ENDPOINT_ADDRESS);
             if (address != null) {
                 buffer.getAddress().append(address);



Mime
View raw message