cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject git commit: [CXF-5790] Response-Code is logged for the response sent over a decoupled endpoint
Date Fri, 06 Jun 2014 17:33:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/master a7208b674 -> 727baf1f0


[CXF-5790] Response-Code is logged for the response sent over a decoupled endpoint


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/727baf1f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/727baf1f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/727baf1f

Branch: refs/heads/master
Commit: 727baf1f02b942f14c3548d0468cf68b945dc440
Parents: a7208b6
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Fri Jun 6 19:32:42 2014 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Fri Jun 6 19:32:55 2014 +0200

----------------------------------------------------------------------
 .../org/apache/cxf/interceptor/LoggingInInterceptor.java    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/727baf1f/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
index f6e56ff..5df0e8e 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
@@ -94,9 +94,12 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
         final LoggingMessage buffer 
             = new LoggingMessage("Inbound Message\n----------------------------", id);
 
-        Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);
-        if (responseCode != null) {
-            buffer.getResponseCode().append(responseCode);
+        if (!Boolean.TRUE.equals(message.get(Message.DECOUPLED_CHANNEL_MESSAGE))) {
+            // avoid logging the default responseCode 200 for the decoupled responses
+            Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);
+            if (responseCode != null) {
+                buffer.getResponseCode().append(responseCode);
+            }
         }
 
         String encoding = (String)message.get(Message.ENCODING);


Mime
View raw message