Carter Kozak created LOG4J2-2318:

             Summary: AsyncQueueFullMessageUtil causes unparsable message output
                 Key: LOG4J2-2318
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.11.0
            Reporter: Carter Kozak

AsyncQueueFullMessageUtil.transform modifies message format, dropping message 
format and parameters, and concatenates text to the formatted output.

It's a fairly common workflow to write a message implementation which outputs 
json or some other structured data (e.g. request logs) which are parsed by 
another mechanism. This often uses PatternLayout with pattern "%m%n". The 
current implementation of AsyncQueueFullMessageUtil concatenates a warning to 
the formatted message, which can break parsers.

Proposal: Avoid modifying the message itself in favor of using 
StatusLogger.warn when messages may be logged out of order.

This message was sent by Atlassian JIRA

Reply via email to