radut commented on pull request #472:
URL: https://github.com/apache/logging-log4j2/pull/472#issuecomment-790592929


   stringified doesn't seem to be working(or at least, not as I expect it to):
   log4j2.xml
   ```
   <Console name="console" target="SYSTEM_OUT" follow="true">
    <JsonTemplateLayout 
eventTemplateUri="classpath:LogstashJsonEventLayout.json" 
stackTraceEnabled="true" />
   <Console>
   ```
   
   
   
   ```
   ThreadContext.push("tcVal2", 2);
   ```
   doesn't get outputed at all
   
![image](https://user-images.githubusercontent.com/4960306/109966057-787b1d00-7cf8-11eb-9045-bc5c1f8ba5c9.png)
   
   
   
   ```
   ThreadContext.put("tcVal2", "2"); // allows only string as value
   ```
   the mdc outputs "tcVal2":"2" as string even if `stringified` is `true` or 
`false`
   
   
   
![image](https://user-images.githubusercontent.com/4960306/109965866-38b43580-7cf8-11eb-8d5f-165d40aa8dc4.png)
   
   
![image](https://user-images.githubusercontent.com/4960306/109965907-449ff780-7cf8-11eb-9c41-1a7d949b3ae9.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to