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

gc-free mixed async loging loses parameter values after the first appender

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 2.11.1, 3.0.0
    • Core
    • None

    Description

      When gc-free logging is used with mixed synchronous/asynchronous loggers, parameter values are replaced with "null" after the first AsyncLoggerConfig.

      The message format is still present, as well as the parameter count, however all values are nulls.
      It appears that Log4jEventWrapperHandler.onEvent invokes MutableLogEvent.clear, which nulls out the parameter array.

      I have constructed a failing test (which I need to clean up and deduplicate some code from the fix for LOG4J2-2299):
      https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1

      Attachments

        Activity

          People

            ckozak Carter Kozak
            ckozak Carter Kozak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: