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

The LoggerConfig includeLocation defaults to true in 2.17.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.17.2
    • 2.20.0
    • Configuration
    • None

    Description

      We've found services running 2.17.2 to be slower than 2.17.1. A heat map indicates a StackWalker in log4j.

      I found that the code that Logger plugin calls into has changed. In 2.17.1 the default config for includeLocation is based only on the configured value. In 2.17.2 it's based on the config value if present, but then defaults to !(context instanceof AsyncLoggerContext).

      Since none of our Logger elements declare includeLocation - the default behavior has changed causing all LogEvents to include their location.

      Attachments

        1. log4j2-3487.patch
          3 kB
          Dave Messink
        2. log4j2-3487-1.patch
          3 kB
          Dave Messink
        3. log4j2-3487-2.patch
          6 kB
          Dave Messink

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dmessink Dave Messink
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: