Skip to content

logstash-logback-encoder-4.4

Choose a tag to compare

@philsttr philsttr released this 11 Jul 19:35
· 903 commits to main since this release

Backwards Incompatibility:

As part of the introduction of StructuredArguments (#99), the return type of the methods in net.logstash.logback.marker.Markers changed to net.logstash.logback.marker.LogstashMarker instead of specific subclasses of LogstashMarker.

Before -> After

If your code stored the result of those methods in a variable of the old return type, then your code will encounter a compile-time error on upgrade. You will need to change the type of your variable to LogstashMarker.

For example, change this:

        ObjectAppendingMarker marker = Markers.append("foo", foo);

to this:

        LogstashMarker marker = Markers.append("foo", foo);

If your code used inline markers (perhaps also with method chaining) without assigning them to variables you will encounter runtime errors. You will need to recompile your code to fix the runtime errors.

This backwards incompatibility was inadvertently overlooked, otherwise we would have bumped the version to 5.0, since this project follows semantic versioning practices.

Changes:

  • #99 Add StructuredArguments as an alternative to Markers for adding fields to the log event JSON output
  • #110 Clear events from RingBuffer after they have been processed (fixes memory leak)
  • #91 Introduced includeCallerData(to be consistent with logback), and deprecated includeCallerInfo
  • #103 Fix isIncludeMdc()
  • #102 fixed setting a prefix without a suffix on the CompositeJsonLayout
  • #100 Created a provider for ILoggingEvent.getMessage()
  • #104 Replace org.slf4j.helpers.LogstashBasicMarker with net.logstash.logback.marker.LogstashBasicMarker
  • Updated dependency versions for logback, jackson, junit, assertj