Guilherme Trein created LOG4J2-2734:
---------------------------------------
Summary: Backwards change of JsonLayout from 2.11 to 2.12
Key: LOG4J2-2734
URL: https://issues.apache.org/jira/browse/LOG4J2-2734
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.12.1, 2.12.0
Reporter: Guilherme Trein
Fix For: 2.11.2
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;
force=false","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; force=false",}}
{{ "timestamp": "2019-12-06T15:49:48.708Z"}}}
I believe the offending commit is
[this|https://github.com/apache/logging-log4j2/commit/e5f4479e25ce76a66b7c4af78bbbd626e2f34ac5#diff-bd20344d81d2abda071f0ccacf79895aL317].
For some reason, the implementation of
AbstractJacksonLayout#toSerializable(LogEvent, Writer) changed (the method call
to convertMutableToLog4jEvent was deleted).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)