Log4j 2
  1. Log4j 2
  2. LOG4J2-478

The message and ndc fields are not JavaScript escaped in JSONLayout

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta9
    • Fix Version/s: 2.0-rc1
    • Component/s: Layouts
    • Labels:
      None

      Description

      The output of the JSONLayout includes the "message" field as is. If there are any embedded newlines, quote, etc, this renders the JSON output as invalid. To correct this, the "message" field should be properly JavaScript escaped.

        Activity

          People

          • Assignee:
            Gary Gregory
            Reporter:
            Michael Friedmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development