ppkarwasz opened a new issue, #1640:
URL: https://github.com/apache/logging-log4j2/issues/1640

   When running on JDK 9+ the 
[`StackTraceElement`](https://docs.oracle.com/javase/9/docs/api/java/lang/StackTraceElement.html)
 class has three additional fields: `classLoaderName`, `moduleName` and 
`moduleVersion`.
   
   These fields:
    * are not used in the stack trace formatter, so stack traces formatted by 
Log4j differ from `StackTraceElement.toString()`,
    * are lost during serialization of `ExtendedStackTraceElement`, so a 
deserialized element differs from the original,
    * are automatically serialized by Jackson, when serializing an event's 
location. Such an event can not be deserialized.
   
   These problems amount to the majority of test failures under JDK 11. This 
blocks #1369.
   
   An example of serialized event:
   ```xml
     <Event xmlns="http://logging.apache.org/log4j/2.0/events"; 
timeMillis="1690783320311" thread="main" level="INFO" 
loggerName="eu.copernik.log4j.test.XmlTest" endOfBatch="false" 
loggerFqcn="org.apache.logging.log4j.spi.AbstractLogger" threadId="1" 
threadPriority="5">
       <Instant epochSecond="1690783320" nanoOfSecond="311415800"/>
       <Message>Hello world!</Message>
       <Source class="eu.copernik.log4j.test.XmlTest" method="main" 
file="XmlTest.java" line="14">
         <classLoaderName xmlns="">app</classLoaderName>
         <moduleName xmlns="">eu.copernik.log4j.test</moduleName>
         <moduleVersion xmlns="">1.0.0</moduleVersion>
       </Source>
       <Thrown commonElementCount="0" name="java.lang.RuntimeException">
         <ExtendedStackTrace>
           <ExtendedStackTraceItem class="eu.copernik.log4j.test.XmlTest" 
method="main" file="XmlTest.java" line="13" exact="true" location="classes/" 
version="?"/>
         </ExtendedStackTrace>
       </Thrown>
     </Event>
   ```


-- 
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]

Reply via email to