vy commented on issue #1674:
URL:
https://github.com/apache/logging-log4j2/issues/1674#issuecomment-1692900405
Using the example Log4j configuration I shared, the following command:
```
logger.info("dumping", new Exception());
```
yields to the following output in `nc`:
```
<134>1 2023-08-25T09:23:16.117+02:00 tahta /home/vy/.../syslog.xml 1101098 -
[mdc@32473 category="bar" exception="java.lang.Exception
at
org.apache.logging.log4j.layout.template.json.JsonTemplateLayoutAdditionalFieldTest.foo(JsonTemplateLayoutAdditionalFieldTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
" priority="INFO" thread="main"] dumping
```
Hence, the stack trace gets attached to the `exception` field of the log
entry. Would you mind explaining (preferably, even showing an example of) what
were you expecting instead, please?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]