Repository: cxf Updated Branches: refs/heads/2.7.x-fixes 95a4363b1 -> 2de3120bf
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/2de3120b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2de3120b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2de3120b Branch: refs/heads/2.7.x-fixes Commit: 2de3120bf156a02b47643da770309dabf9f647e3 Parents: 95a4363 Author: Akitoshi Yoshida <[email protected]> Authored: Fri Jun 6 19:32:42 2014 +0200 Committer: Akitoshi Yoshida <[email protected]> Committed: Fri Jun 6 19:38:47 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/2de3120b/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java b/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java index 7f224ba..c2ed46d 100644 --- a/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java +++ b/api/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java @@ -93,9 +93,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);
