You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Mikael Ståldal (JIRA)" <ji...@apache.org> on 2014/04/29 17:15:20 UTC

[jira] [Updated] (LOG4J2-623) Better structure of Thread Context Map in JSONLayout

     [ https://issues.apache.org/jira/browse/LOG4J2-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikael Ståldal updated LOG4J2-623:
----------------------------------

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

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

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 name it "mdc" rather than the quite vauge "Properties"?

{code:JavaScript}
  "mdc": {
    "UserName":"admin", 
    "OrgName":"test"
  }
{code:JavaScript}


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

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

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 name it "mdc" rather than the quite vauge "Properties"?

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



> Better structure of Thread Context Map in JSONLayout
> ----------------------------------------------------
>
>                 Key: LOG4J2-623
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-623
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>    Affects Versions: 2.0-rc1
>            Reporter: Mikael Ståldal
>            Priority: Minor
>
> Currently, the Thread Context Map looks like this in JSONLayout:
> {code:JavaScript}
>  "Properties":[
>       {
>         "name":"UserName",
>         "value":"admin"
>       },
>       {
>         "name":"OrgName",
>         "value":"test"
>       } 
>     ] 
> {code:JavaScript}
> 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 name it "mdc" rather than the quite vauge "Properties"?
> {code:JavaScript}
>   "mdc": {
>     "UserName":"admin", 
>     "OrgName":"test"
>   }
> {code:JavaScript}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org