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/14 17:12:33 UTC
[jira] [Resolved] (LOG4J2-1296) Add MessageFactory that reuses a
cached Message instance
[ https://issues.apache.org/jira/browse/LOG4J2-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Remko Popma resolved LOG4J2-1296.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.6
The reusable message StringBuilder in each RingBufferLogEvent is now trimmed to max length 258 to ensure occasional very long messages do not result in large char[] arrays being held by the RingBuffer forever.
I believe the work for this ticket is now complete, marking this issue as resolved.
> Add MessageFactory that reuses a cached Message instance
> --------------------------------------------------------
>
> Key: LOG4J2-1296
> URL: https://issues.apache.org/jira/browse/LOG4J2-1296
> Project: Log4j 2
> Issue Type: New Feature
> Components: API
> Affects Versions: 2.5
> Reporter: Remko Popma
> Assignee: Remko Popma
> Fix For: 2.6
>
>
> As discussed in LOG4J2-1270, all current MessageFactory implementations create new temporary Message objects. A GC-free configuration needs a different MessageFactory that reuses Message instances.
> When Messages are being reused, async logging components need to be aware of this and ensure the Message _content_ (rather than the Message instance itself) is passed to the background thread. However, Messages that are not reusable should be passed to the background thread unchanged.
--
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