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 28ABC18255 for ; Mon, 1 Jun 2015 14:34:20 +0000 (UTC) Received: (qmail 29854 invoked by uid 500); 1 Jun 2015 14:34:20 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 29825 invoked by uid 500); 1 Jun 2015 14:34:20 -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 29813 invoked by uid 99); 1 Jun 2015 14:34:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 14:34:20 +0000 Date: Mon, 1 Jun 2015 14:34:19 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D145673= 60#comment-14567360 ]=20 ASF GitHub Bot commented on CXF-6423: ------------------------------------- Github user cschneider commented on the pull request: https://github.com/apache/cxf/pull/75#issuecomment-107528593 =20 I think ideally we should have two different switches. One for the pret= ty printing and one for reparing the xml. There is value to both options. I= t makes sense to provide well formed xml for tools that need it but it can = also be important to truncate at exactly the correct place. > 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 > Assignee: Christian Schneider > 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)