[
https://issues.apache.org/jira/browse/LOG4J2-2475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652561#comment-16652561
]
ASF GitHub Bot commented on LOG4J2-2475:
----------------------------------------
Github user cakofony commented on the issue:
https://github.com/apache/logging-log4j2/pull/218
No worries, thank you for your feedback as always!
We might want to consider updating `ReusableMessageFactory.newMessage(final
String message, final Object... params)` to return a non-reusable
ParameterizedMessage instance. It seems like a bug that logging an object array
may result in that array being mutated the next time an event is logged on the
same thread. It's unfortunate that we cannot differentiate between an array
passed as a value, and an array created by a varargs invocation.
Thoughts?
> Limit reusable event.clear parameter clearing to argsCount
> ----------------------------------------------------------
>
> Key: LOG4J2-2475
> URL: https://issues.apache.org/jira/browse/LOG4J2-2475
> Project: Log4j 2
> Issue Type: Improvement
> Components: Core
> Reporter: Carter Kozak
> Assignee: Carter Kozak
> Priority: Major
>
> Larger parameter arrays may make their way into log4j when passed into the
> logger directly. These may take longer to clear, despite only containing one
> or two parameters.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)