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

Add max message size limit to JSON Layout

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.11.1
    • Fix Version/s: None
    • Component/s: Layouts
    • Labels:
      None

      Description

      In edge-cases the json representation of stack-traces can become too large for log-consuming systems (>16KB in the specific case).

      Therefore I'd like to propose introducing a new configuration parameter limitMessageSize to keep the log record within certain size boundaries under all circumstances. Similar to the maxLength option available in the PatternLayout.

       

      For more context, see this question on stackoverflow:
      https://stackoverflow.com/questions/53335345/limit-log-event-length-in-log4j2-json-layout-to-prevent-hitting-docker-log-drive

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fabian-braun Fabian Braun
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: