Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
When I added custom fields to the JsonLayout, I was expecting these fields to be added to the original message. What I instead observed was the following.
The original message, of format:
{ "thread" : "main", "level" : "INFO", "loggerName" : "com.ibm.sterling.afc.common.external.PrometheusServlet", "message" : "Started the Prometheus Metrics Server", "endOfBatch" : true, "loggerFqcn" : "org.apache.logging.log4j.spi.AbstractLogger", "contextMap" : \{ }
,
"instant" :
,
"threadId" : 1,
"threadPriority" : 5
}
Became the following format:
{ "logEvent" : "Started the Prometheus Metrics Server", "key1" : "value1", "key2" : "value2" }
Is there a way to add additional fields to a JsonLayout without losing out on the other valuable information? The docs don't make this clear if so, and trial and error has been fruitless. If this isn't possible, then could this functionality be added?
Thank you