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

Add MessageFactory that reuses a cached Message instance

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6
    • API
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: