Log4j 2
  1. Log4j 2
  2. LOG4J2-623

Better structure of Thread Context Map in JSONLayout

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0-rc1, 2.0, 2.0.1
    • Fix Version/s: 2.0-rc2
    • Component/s: Layouts
    • Labels:
      None

      Description

      Currently, the Thread Context Map looks like this in JSONLayout:

      Current
       "Properties":[
            {
              "name":"UserName",
              "value":"admin"
            },
            {
              "name":"OrgName",
              "value":"test"
            } 
          ] 
      

      This does not properly make use of the JSON data format. Since the Thread Context Map is a map, it should be represented as a JSON object. And why not name it "mdc" rather than the quite vauge "Properties"?

      Suggested
        "mdc": {
          "UserName":"admin", 
          "OrgName":"test"
        }
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Mikael Ståldal
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:

              Development