You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/06/12 15:47:00 UTC

[jira] [Commented] (LOG4J2-2352) Reusable event message mementos should be cached

    [ https://issues.apache.org/jira/browse/LOG4J2-2352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16509771#comment-16509771 ] 

ASF GitHub Bot commented on LOG4J2-2352:
----------------------------------------

GitHub user cakofony opened a pull request:

    https://github.com/apache/logging-log4j2/pull/181

    [LOG4J2-2352] Reusable event message mementos are memoized

    Fixed RingBufferLogEvent.memento which returned a
    ParameterizedMessage rather than a MememntoMessage.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cakofony/logging-log4j2 LOG4J2-2352

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/logging-log4j2/pull/181.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #181
    
----
commit 00ad8b30708579517b931b1380091b461ca93e72
Author: Carter Kozak <ck...@...>
Date:   2018-06-12T15:03:43Z

    [LOG4J2-2352] Reusable event message mementos are memoized
    
    Fixed RingBufferLogEvent.memento which returned a
    ParameterizedMessage rather than a MememntoMessage.

----


> Reusable event message mementos should be cached
> ------------------------------------------------
>
>                 Key: LOG4J2-2352
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2352
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Carter Kozak
>            Assignee: Carter Kozak
>            Priority: Major
>
> When multiple AsyncAppenders are configured, we invoke MutableLogEvent.memento (or RingBufferLogEvent.memento) for each one, allocating multiple formatted strings.
> On the first invocation, we can set the event message to the new MementoMessage to avoid re-allocations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)