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

   `EventLookup.lookup` returns `event.getMessage().getFormattedMessage()` for 
the `Message` key without a null check (`EventLookup.java:68`). `Log4jLogEvent` 
accepts a null message, so `${event:Message}` throws `NullPointerException` for 
such an event. The `Marker` key already checks for null (`EventLookup.java:41`).
   
   `StrSubstitutor` catches it, so the expression stays literal, but every 
evaluation logs "Resolver failed to lookup event:Message" to the status logger.
   
   Fix: return null when `event.getMessage()` is null.


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