logstash-logback-encoder-6.0
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)
DeprecateLogstashSocketAppenderin favor ofLogstashUdpSocketAppender - #127 Added
FailureSummaryLoggingAppenderListenerfor 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
reconnectionDelayworks, and introducingPreferPrimaryDestinationConnectionStrategy.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,
LogstashSocketAppenderhas been deprecated in favor ofLogstashUdpSocketAppenderwith aLogstashLayout -
For #132, the async appenders (including the tcp appenders) will now add a logback
OnConsoleStatusListenerif 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 settingaddDefaultStatusListenertofalseon the appender. -
For #193, The
preferPrimaryconnection 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, specify0 secondsfor theminConnectionTimeBeforePrimaryas documented here -
For #274, to support non-JSON output, a new
default JsonFactory decorate(JsonFactory factory)method has been added to theJsonFactoryDecoratorinterface.
The oldMappingJsonFactory decorate(MappingJsonFactory factory)method has been made adefaultmethod, 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 customJsonFactoryDecoratorimplementations should change their implementation to the new method.