Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 54719 invoked from network); 12 Nov 2007 21:25:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 21:25:21 -0000 Received: (qmail 30997 invoked by uid 500); 12 Nov 2007 21:25:09 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 30941 invoked by uid 500); 12 Nov 2007 21:25:08 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 30932 invoked by uid 99); 12 Nov 2007 21:25:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 13:25:08 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 21:26:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C4A381A9832; Mon, 12 Nov 2007 13:24:57 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r594302 - in /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor: LoggingInInterceptor.java LoggingOutInterceptor.java Date: Mon, 12 Nov 2007 21:24:57 -0000 To: cxf-commits@incubator.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071112212457.C4A381A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Mon Nov 12 13:24:56 2007 New Revision: 594302 URL: http://svn.apache.org/viewvc?rev=594302&view=rev Log: Fix logging interceptors to not store EVERYTHING logged to them and also be thread safe. Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java?rev=594302&r1=594301&r2=594302&view=diff ============================================================================== --- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java (original) +++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java Mon Nov 12 13:24:56 2007 @@ -37,7 +37,6 @@ public class LoggingInInterceptor extends AbstractPhaseInterceptor { private static final Logger LOG = LogUtils.getL7dLogger(LoggingInInterceptor.class); - private final LoggingMessage buffer = new LoggingMessage("Inbound Message\n----------------------------"); private int limit = 100 * 1024; private boolean enabled; @@ -56,10 +55,6 @@ this.enabled = b; } - public LoggingMessage getBuffer() { - return this.buffer; - } - public void setLimit(int lim) { limit = lim; } @@ -75,6 +70,9 @@ } private void logging(Message message) throws Fault { + final LoggingMessage buffer = new LoggingMessage("Inbound Message\n----------------------------"); + + String encoding = (String)message.get(Message.ENCODING); if (encoding != null) { Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java?rev=594302&r1=594301&r2=594302&view=diff ============================================================================== --- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java (original) +++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java Mon Nov 12 13:24:56 2007 @@ -37,7 +37,6 @@ public class LoggingOutInterceptor extends AbstractPhaseInterceptor { private static final Logger LOG = LogUtils.getL7dLogger(LoggingOutInterceptor.class); - private final LoggingMessage buffer = new LoggingMessage("Outbound Message\n---------------------------"); private int limit = 100 * 1024; private boolean enabled; @@ -64,10 +63,6 @@ return limit; } - public LoggingMessage getBuffer() { - return this.buffer; - } - public void handleMessage(Message message) throws Fault { final OutputStream os = message.getContent(OutputStream.class); if (os == null) { @@ -89,6 +84,8 @@ } public void onClose(CachedOutputStream cos) { + final LoggingMessage buffer = new LoggingMessage("Outbound Message\n---------------------------"); + if (cos.getTempFile() == null) { //buffer.append("Outbound Message:\n"); if (cos.size() > limit) {