Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2253

Reusable messages missing a garbage free parameter accessor

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: None
    • Labels:
      None

      Description

      I have a layout which iterates through message parameters, however Message.getParameters causes allocation on many implementations.

      It appears that ReusableMessage.swapParameters is supposed to fill this gap, however some messages types do allocation when this is invoked (see ReusableParameterizedMessage) which isn't helpful for access on a single thread where we don't want to take ownership of values.

      I've put together a proposal for an accessor similar to MapMessage:
      https://github.com/apache/logging-log4j2/pull/150

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                ckozak Carter Kozak
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: