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

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rpopma Remko Popma
            rpopma Remko Popma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment