[
https://issues.apache.org/jira/browse/LOG4J2-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15184965#comment-15184965
]
Remko Popma commented on LOG4J2-1296:
-------------------------------------
This problem has now been addressed.
* LogEventProxy (the snapshot of the LogEvent taken by AsyncAppender) now makes
a copy of the Message if the Message is reusable
* AsyncLoggerConfig now calls Log4jLogEvent.makeMessageImmutable() before
passing the LogEvent to another thread
* RingbufferLogEvent.createMemento() now makes a copy of the Message if the
Message is reusable
> 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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]