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

Better structure of Thread Context Map in JSONLayout

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • 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"
        }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                mikaelstaldal Mikael Ståldal
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: