[
https://issues.apache.org/jira/browse/LOG4J2-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13997380#comment-13997380
]
Mikael Ståldal commented on LOG4J2-623:
---------------------------------------
The latest code from SVN does not seem to work, I get this error when trying to
use JSONLayout:
java.lang.NoClassDefFoundError:
com/fasterxml/jackson/core/JsonProcessingException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.privateGetPublicMethods(Class.java:2651)
at java.lang.Class.getMethods(Class.java:1467)
at
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.withFactoryMethodAnnotatedBy(PluginBuilder.java:87)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:710)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:665)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:657)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:657)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:334)
at
org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:156)
at
org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:380)
at
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:427)
at
org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:164)
at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:73)
at
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:35)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:268)
at org.apache.log4j.Logger$PrivateManager.getContext(Logger.java:59)
at org.apache.log4j.Logger.getLogger(Logger.java:41)
> 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
> Assignee: Ralph Goers
> Priority: Minor
> Fix For: 2.0-rc2
>
>
> Currently, the Thread Context Map looks like this in JSONLayout:
> {code:JavaScript|title=Current}
> "Properties":[
> {
> "name":"UserName",
> "value":"admin"
> },
> {
> "name":"OrgName",
> "value":"test"
> }
> ]
> {code}
> 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"?
> {code:JavaScript|title=Suggested}
> "mdc": {
> "UserName":"admin",
> "OrgName":"test"
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]