Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BE471992C for ; Tue, 29 Mar 2016 08:20:26 +0000 (UTC) Received: (qmail 47257 invoked by uid 500); 29 Mar 2016 08:20:25 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 47202 invoked by uid 500); 29 Mar 2016 08:20:25 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 47178 invoked by uid 99); 29 Mar 2016 08:20:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2016 08:20:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7FCB62C1F62 for ; Tue, 29 Mar 2016 08:20:25 +0000 (UTC) Date: Tue, 29 Mar 2016 08:20:25 +0000 (UTC) From: =?utf-8?Q?Mikael_St=C3=A5ldal_=28JIRA=29?= To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (LOG4J2-1329) API change: let Message.getFormattedMessage() return CharSequence instead of String 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/LOG4J2-1329?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D152= 15667#comment-15215667 ]=20 Mikael St=C3=A5ldal edited comment on LOG4J2-1329 at 3/29/16 8:20 AM: ----------------------------------------------------------------- GelfLayout do have its own buffer, but the issue is that it needs to escape= the message (replace " with \" etc) before appending it to the buffer. was (Author: mikaelstaldal): GelfLayout do have its own buffer, but the issue is that it need to escape = the message (replace " with \" etc) before appending it to the buffer. > API change: let Message.getFormattedMessage() return CharSequence instead= of String > -------------------------------------------------------------------------= ---------- > > Key: LOG4J2-1329 > URL: https://issues.apache.org/jira/browse/LOG4J2-1329 > Project: Log4j 2 > Issue Type: Improvement > Components: API > Affects Versions: 2.5 > Reporter: Remko Popma > > I propose that we change {{Message.getFormattedMessage()}} to return a {{= CharSequence}} instead of a String. > I believe this change would be backwards compatible (all Message implemen= tations that return a String will work as is), and it opens the way > for zero-GC Message implementations to return a cached StringBuilder as M= ikael [suggested on the log4j-dev mailing list|http://mail-archives.apache.= org/mod_mbox/logging-log4j-dev/201603.mbox/%3CCAAFrFhSs4EqjOERwHObKAZP4wjGW= eiCET1nyE1FVndYdePk2yw%40mail.gmail.com%3E]. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org