With the JsonLayout the logging message is being displayed as a string with
"messages" key as below.
"message" :
"{\"ReqId\":\"12345\",\"appName\":\"1_APP\",\"actionName\":\"PUT
operation\"}",
Is it possible to write the individual fields as key/value pair on its own?
Please let me know how we can customize the json layout for this.
"ReqId" : "12345",
"appName" : "1_APP",
"actionName" : "PUT operation"
This is the complete log message for reference:
{
"timeMillis" : 1483466765852,
"thread" : "main",
"level" : "INFO",
"loggerName" : "com.capitalone.cerberus.logging.JsonTest",
"message" :
"{\"ReqId\":\"12345\",\"appName\":\"1_APP\",\"actionName\":\"PUT
operation\"}",
"endOfBatch" : false,
"loggerFqcn" : "org.apache.logging.log4j.spi.AbstractLogger",
"threadId" : 1,
"threadPriority" : 5,
"source" : {
"class" : "com.capitalone.cerberus.logging.JsonTest",
"method" : "main",
"file" : "JsonTest.java",
"line" : 17
}
}