Open meganalnico opened 2 years ago
I have an even better fix. This way, no matter what happens you at least have valid JSON.
private void serializeEvent(JsonGenerator gen, T event, List<AbstractPropertyAndEncoder<T>> propertyList) throws IOException {
try {
gen.writeStartObject();
serializeCommonFields(gen, event);
for (AbstractPropertyAndEncoder<T> pae : propertyList) {
propertySerializer.serializeProperty(gen, event, pae);
}
} finally {
gen.writeEndObject();
}
}
Probably the same: https://github.com/internetitem/logback-elasticsearch-appender/issues/63
logger.info(null) throws NPE when publishing with version 1.6
Also es-logger reports this:
ClassicElasticsearchPublisher line 37
It's very possible that a value is unexpectedly null. One might fix it thus:
This way in the case of a null value the string "null" is placed in the message.