You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2016/03/17 23:48:33 UTC
[jira] [Resolved] (LOG4J2-1321) NameAbbreviator creates temporary
objects
[ https://issues.apache.org/jira/browse/LOG4J2-1321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Remko Popma resolved LOG4J2-1321.
---------------------------------
Resolution: Fixed
Fixed in master.
> NameAbbreviator creates temporary objects
> -----------------------------------------
>
> Key: LOG4J2-1321
> URL: https://issues.apache.org/jira/browse/LOG4J2-1321
> Project: Log4j 2
> Issue Type: Improvement
> Components: Pattern Converters
> Affects Versions: 2.5
> Reporter: Remko Popma
> Assignee: Remko Popma
> Fix For: 2.6
>
>
> PatternLayout's NamePatternConverter and ClassNamePatternConverter delegate to {{NameAbbreviator}}.
> The current API that NameAbbreviator supports is
> {code}
> String abbreviate(String original)
> {code}
> This creates temporary objects. However, the clients of NameAbbreviator already have a StringBuilder to write into. I propose to modify the NameAbbreviator API to this:
> {code}
> void abbreviate(String original, StringBuilder destination)
> {code}
--
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