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

Update PatternLayout to utilize gc-free mechanism for LogEvent processing

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

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

      Description

      LOG4J2-1274 added the encode(LogEvent, ByteBufferDestination) method to Layout. The default implementation in AbstractLayout calls the existing toByteArray logic and writes the result into the ByteBuffer, so all layouts work as before even when the new method is called.

      This ticket is to modify PatternLayout to utilize the TextEncoderHelper class to avoid creating temporary objects when the encode method is called.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              rpopma Remko Popma
              Reporter:
              rpopma Remko Popma

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment