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

Large extendedStackTrace in JsonLayout (I assume XMLLayout and YamlLayout as well)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.11.2
    • None
    • Core
    • None

    Description

      The extended stack trace value in jsonlayout can be extremely long, especially if stackTraceAsString is false (the default). There should be a way to cap the size of the extended stack trace. Maybe something that is the Pattern equivalent of %ex{n}? Posted a real example in the comments (we run pretty standard spring boot applications). 20k characters is pretty excessive, and this interferes with our scalyr log uploads.

      In fact, is there any way to make it significantly more configurable? Like removing the jar from the stacktrace and maybe shortening logger names?

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ayush-finix Ayush Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: