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

Add MessageFactory that reuses a cached Message instance

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: API
    • Labels:
      None

      Description

      As discussed in LOG4J2-1270, all current MessageFactory implementations create new temporary Message objects. A GC-free configuration needs a different MessageFactory that reuses Message instances.

      When Messages are being reused, async logging components need to be aware of this and ensure the Message content (rather than the Message instance itself) is passed to the background thread. However, Messages that are not reusable should be passed to the background thread unchanged.

        Attachments

          Activity

            People

            • Assignee:
              rpopma Remko Popma
              Reporter:
              rpopma Remko Popma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: