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

Backwards incompatible change of JsonLayout from 2.11 to 2.12

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.12.0, 2.12.1
    • 2.13.1
    • Core
    • None

    Description

      I'm reporting what I believe is a regression. After updating from v2.11.2 to v2.12.1, I noticed that the JSON log entries changed for my application:

       

      Here is what I had in v2.11.2:

      {
        "thread":"main",
        "level":"INFO",
        "loggerName":"com.some.Class",
        "message":"Attempting to report profile data: lastAttempted=1575645588542; now=1575647388708;",
        "endOfBatch":true,
        "loggerFqcn":"org.apache.logging.slf4j.Log4jLogger",
        "instant":{"epochSecond":1575907354,"nanoOfSecond":460000000},
        "threadId":1,
        "threadPriority":5,
        "timestamp":"2019-12-06T15:49:48.708Z"
      }
      

      Here is what I got in v2.12.1:

      {
        "logEvent": "Attempting to report profile data: lastAttempted=1575645588542; now=1575647388708;",
        "timestamp": "2019-12-06T15:49:48.708Z"
      }
      

      I believe the offending commit is this. For some reason, the implementation of AbstractJacksonLayout#toSerializable(LogEvent, Writer) changed (the method call to convertMutableToLog4jEvent was deleted).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              trein Guilherme Trein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: