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

PatternLayout: %xEx{ [ "short" | depth]} not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.11.0, 2.11.1, 2.11.2, 2.12.0, 2.12.1, 2.13.0, 2.13.1, 2.13.2, 2.14.0, 2.13.3, 2.14.1, 2.15.0, 2.16.0, 2.17.1, 2.17.0, 2.12.3, 2.12.2, 2.18.0, 2.12.4, 2.17.2, 2.19.0
    • 2.25.0
    • Layouts
    • None

    Description

      According to the documentation the patterns %xEx{short} or %xEx{<num>} should limit the number of lines of a stack trace that is logged. This doesn't work; instead, the complete stack trace is logged (always!). This is in contrary to the patterns %ex or %rEx where this works.

      In commit 9ff63b2e50be754ae394feda2c33d9e64fd0ab3a (2018-01-25) a change was implemented because of LOG4J2-2195 (according to the commit message) that removed the option of limiting the number of lines to output.

      Therefore all versions since 2.11.0 should be affected.

      Attachments

        Issue Links

          Activity

            People

              vy Volkan Yazici
              t_heit Thorsten Heit
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h
                  5h