Skip to content

logstash-logback-encoder-6.0

Choose a tag to compare

Overview

Version 6.0 is a major release with several new features and bugfixes.

Several backwards incompatibilities were introduced (see section below). Most have the ability to revert to previous behavior via config changes if necessary.

Support for Java 1.7 has been removed. Java 1.8 or above is now required.

New Features

  • #80 Add UDP appender that can use any layout (LogstashUdpSocketAppender)
    Add UDP appender for AccessEvents (LogstashAccessUdpSocketAppender)
    Deprecate LogstashSocketAppender in favor of LogstashUdpSocketAppender
  • #127 Added FailureSummaryLoggingAppenderListener for logging a message after the first successfully logged event after a series of failures
  • #132 Auto-add console status listener in async appenders, so that errors are visible by default
  • #193 Avoid reconnection storm by reworking how reconnectionDelay works, and introducing PreferPrimaryDestinationConnectionStrategy.minConnectionTimeBeforePrimary
  • #201 Add ability for the pattern provider to omit fields whose values are empty (omitEmptyFields)
  • #274 Support non-JSON output in other Jackson dataformats (e.g. Smile, CBOR, YAML) via decorators
  • #326 Support adding additional providers to LogstashAccessEncoder
  • #327 / #328 (@brenuart) Trigger ssl handshake on connection establishment, to catch ssl handshake failures early
  • #330 (@brenuart) minor coding optimizations
  • #334 Support deferred Markers
  • #335 Support Marker aggregation and empty markers

Bug fixes

  • #336 Add newline at end of stacktrace truncated due to maxLength
  • #322 (@bwaldvogel) Fix typo in stack hash doc

Dependency version changes

Usage Dependency Old Version New Version
Runtime jackson 2.9.8 2.9.9
Runtime uuid-generator 3.1.5 3.2.0
Runtime (shaded) commons-lang 2.6 n/a
Runtime (shaded) commons-lang3 n/a 3.9
Compile-time animal-sniffer 1.17 1.18
Test-time mockito 2.23.4 2.27.0
Test-time commons-io 2.6 n/a

Backwards Incompatibilities

  • Support for Java 1.7 has been removed. Java 1.8 or above is now required.

  • For #80, LogstashSocketAppender has been deprecated in favor of LogstashUdpSocketAppender with a LogstashLayout

  • For #132, the async appenders (including the tcp appenders) will now add a logback OnConsoleStatusListener if no status listener has been registered. This provides a better out-of-the-box experience by ensuring error status messages are visible on the console by default.
    The automatic registering can be disabled by either registering a different logback status listener or by setting addDefaultStatusListener to false on the appender.

  • For #193, The preferPrimary connection strategy will now by default ensure a connection has been open for at least 10 seconds before preferring primary again.
    If a connection has been open less than 10 seconds, other secondary destinations will be attempted before trying primary again.
    To revert to the old behavior of always preferring primary, specify 0 seconds for the minConnectionTimeBeforePrimary as documented here

  • For #274, to support non-JSON output, a new default JsonFactory decorate(JsonFactory factory) method has been added to the JsonFactoryDecorator interface.
    The old MappingJsonFactory decorate(MappingJsonFactory factory) method has been made a default method, and has been deprecated.
    The new method is the preferred method of the interface. The old method will be removed in a future release.
    Any custom JsonFactoryDecorator implementations should change their implementation to the new method.