Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2318

AsyncQueueFullMessageUtil causes unparsable message output

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11.0
    • Fix Version/s: 3.0.0
    • Component/s: Core
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ckozak Carter Kozak
                Reporter:
                ckozak Carter Kozak
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: