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

Make the content of the generated log4j2plugins.dat file repeatable

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.12.1
    • Fix Version/s: 2.13.1
    • Component/s: Plugins
    • Labels:
      None

      Description

      The content of the generated Log4j2Plugins.dat does not appear to be repeatable. I noticed the problem as it affects Gradle's build caching. Getting different output from Java compilation for the same inputs causes a cache miss and additional work that should be unnecessary.

      Looking at the code, I believe that the problem is that PluginProcessor.process works with a Set of elements and that PluginCache uses an insertion-order map. If the order of the elements in the Set changes, they will be inserted into the cache in a different order and then written out in a different order.

      Would it be possible to use TreeMap s in PluginCache so that the categories and their entries are written in name order?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              awilkinson Andy Wilkinson
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: