-
Notifications
You must be signed in to change notification settings - Fork 414
Closed
Labels
Description
Describe the bug
tryJson drops logs when JSON object has a field with a null value
To Reproduce
Steps to reproduce the behavior:
- Use this
logback.xmlconfiguration...
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<pattern>
<pattern>
{
"event":"#tryJson{%message}"
}
</pattern></pattern>
</providers>
</encoder>
</appender>
- Execute this logger statement
logger.debug("{\"field\":null}");- See error, or unexpected output
the log is empty
Expected behavior
The log output should contain
"event":{"field":null}Additional context
This used to work with logstash-logback-encoder 6.6
- logstash-logback-encoder 7.0
- logback version 1.2.7
- jackson version 2.13.0
- java version OpenJDK 64-Bit Server VM 11.0.11+9
lachezar