Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8020A17937 for ; Wed, 27 May 2015 17:45:17 +0000 (UTC) Received: (qmail 61372 invoked by uid 500); 27 May 2015 17:45:17 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 61334 invoked by uid 500); 27 May 2015 17:45:17 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 61322 invoked by uid 99); 27 May 2015 17:45:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 17:45:17 +0000 Date: Wed, 27 May 2015 17:45:17 +0000 (UTC) From: =?utf-8?Q?Thomas_Skj=C3=B8lberg_=28JIRA=29?= To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6423) PrettyLoggingFilter tests and improvements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6423?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Skj=C3=B8lberg updated CXF-6423: ---------------------------------- Description:=20 Improvements for PrettyLoggingFilter in the cxf-rt-features-logging module:= =20 1. use a StringReader instead of getting bytes from a String and using an I= nputStream (capture encoding issues at an eariler stage) 2. add parser exception handling based on whether the payload is truncated = or not; return original XML if deemed invalid 3. do not call XMLStreamWriter.close() before getting contents for truncate= d or invalid XML because some writers misbehave (are extra helpful) in a wa= y unfit for logging.=20 4.construct output StringWriter with a size based on the raw XML string siz= e 5.additional test cases=20 was: Improvements for PrettyLoggingFilter in the cxf-rt-features-logging module:= =20 1. use a StringReader instead of getting bytes from a String and using an I= nputStream (capture encoding issues at an eariler stage) 2. add parser exception handling based on whether the payload is truncated = or not; return original XML if deemed invalid 3. do not call XMLStreamWriter.close() before getting contents for truncate= d or invalid XML because some writers misbehave.=20 4.construct output StringWriter with a size based on the raw XML string siz= e 5.additional test cases=20 > PrettyLoggingFilter tests and improvements > ------------------------------------------ > > Key: CXF-6423 > URL: https://issues.apache.org/jira/browse/CXF-6423 > Project: CXF > Issue Type: Improvement > Reporter: Thomas Skj=C3=B8lberg > Priority: Minor > > Improvements for PrettyLoggingFilter in the cxf-rt-features-logging modul= e:=20 > 1. use a StringReader instead of getting bytes from a String and using an= InputStream (capture encoding issues at an eariler stage) > 2. add parser exception handling based on whether the payload is truncate= d or not; return original XML if deemed invalid > 3. do not call XMLStreamWriter.close() before getting contents for trunca= ted or invalid XML because some writers misbehave (are extra helpful) in a = way unfit for logging.=20 > 4.construct output StringWriter with a size based on the raw XML string s= ize > 5.additional test cases=20 -- This message was sent by Atlassian JIRA (v6.3.4#6332)