Skip to content

Releases: logfellow/logstash-logback-encoder

logstash-logback-encoder-6.3

07 Dec 04:11
logstash-logback-encoder-6.3
a712351
Compare
Choose a tag to compare

Enhancements

  • #378 / #382 Masking support (with inspiration from @rusucosmin)
  • #363 jackson upgrades (@sdudzin )
  • #374 Added support for a line separator in CompositeJsonLayout (defaults to no line separator for backwards compitability, but can now be configured with a line separator like CompositeJsonEncoder)
  • #380 Set Automatic-Module-Name to logstash.logback.encoder in MANIFEST.MF
  • #379 Switch from travis ci to github actions (releases are now automated!)
    • Switch from oss-parent to nexus-staging-maven-plugin
    • Use mvnw for building
  • Added issue templates

Documentation Updates

Dependency Updates

Usage Dependency Old Version New Version
Runtime jackson 2.9.9.20190807 2.10.1
Compile-time maven-jar-plugin 3.1.2 3.2.0
Compile-time maven-source-plugin 3.1.0 3.2.0
Compile-time maven-javadoc-plugin 3.0.0 3.1.1
Compile-time maven-gpg-plugin n/a 1.6
Compile-time nexus-staging-maven-plugin n/a 1.6.8
Test-time assertj 3.13.2 3.14.0
Test-time mockito 2.28.2 3.2.0

logstash-logback-encoder-6.2

08 Sep 07:28
Compare
Choose a tag to compare

Enhancements

  • #341 Pro-actively reopen the connection when the socket reader detects the connection has been closed instead of waiting for the next event
  • #343 Introduce writeTimeout to detect stuck TCP write operations, and reopen the connection
  • #344 Add getConnectionDestination() to TCP appenders to provide visibility into the currently connected destination
  • #346 Async appenders now flush delegate OutputStreamAppenders at the end of each batch
  • #353 Don't block trying to publish a keep alive event if the ring buffer is full.
  • #357 Include all public packages from logstash-logback-encoder in OSGi Exported-Packages in manifest
  • #359 Update jackson-bom to 2.9.9.20190807, which updates jackson-databind to 2.9.9.3 to fix some deserialization security vulnerabilities (logstash-logback-encoder was not affected, since it does not deserialize JSON data) (@kubukoz)

Documentation Updates

  • #342 Clarified advantages/disadvantages of disabling write buffer
  • #345 Add required downcast in JsonFactoryDecorator example
  • #348 Mention in documentation that ShortenedThrowableConverter only applies to Throwables logged as extra arguments (e.g. not structured arguments or markers)
  • #358 Fixed xml tag in example (@agentgonzo)

Dependency Updates

Usage Dependency Old Version New Version
Runtime jackson 2.9.9 2.9.9.20190807
Compile-time maven-bundle-plugin 4.2.0 4.2.1
Test-time mockito 2.27.0 2.28.2
Test-time assertj 2.9.1 3.13.2

logstash-logback-encoder-6.1

15 Jun 20:05
Compare
Choose a tag to compare
  • #338 Deferred markers (Markers.defer(...)) are now memoized, so the same value is used when encoding for all appenders
  • #339 The default status listener registered by async appenders changed from logback's OnConsoleStatusListener to a custom status listener that only outputs warn/error status messages to standard out
  • #340 Marker references are now included when %marker is used in patterns

logstash-logback-encoder-6.0

03 Jun 04:04
Compare
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.

logstash-logback-encoder-5.3

22 Jan 00:17
Compare
Choose a tag to compare
  • #307 Add support for excluding markers via <includeTags>false</includeTags> (@ramsperger)
  • #311 Provide a way to access the fieldValue of SingleFieldAppendingMarker
  • #315 Allow Jackson ObjectMapper to scan for available modules on the classpath
  • #306 Remove usage of powermock
  • Updated license files so ASL 2.0 can be properly detected by github
  • Added warning to readme about prefix/suffix not working due to LOGBACK-1326 and logback PR#383

Upgrade Notes

  • As part of #315, logstash-logback-encoder will configure jackson to dynamically scan and find jackson modules available on the classpath. See Registering Jackson Modules for more info.
  • The Logback11Support class methods were changed from static methods to instance methods to allow for easier unit test mocking. Since this is an internal class, it should not affect end users

Dependency version changes

Usage Dependency Old Version New Version
Runtime jackson 2.9.6 2.9.8
Compile-time maven-compiler-plugin 2.3.2 3.8.0
Test-time mockito 2.9.0 2.23.4
Test-time powermock 1.7.3 removed

logstash-logback-encoder-5.2

05 Aug 00:17
Compare
Choose a tag to compare
  • #288 / #289 Move logback-core to provided scope (@yborovikov)
  • #295 Fix #tryJson when messages start with a number
  • #299
    • Allow SleepingWaitStrategy's retries and parkTimeNs to be configured
    • Added warning to README about CPU utilization of SleepingWaitStrategy.
    • added support for LiteTimeoutBlockingWaitStrategy
  • #294 Don't fill in stack trace in test exception (affects unit test only) (@kampka)

Dependency version changes

Usage Dependency Old Version New Version
Runtime jackson 2.9.5 2.9.6
Runtime uuid 3.1.4 3.1.5
Runtime (shaded) disruptor 3.3.8 3.4.2
Compile-time animal-sniffer 1.16 1.17
Test-time assertj 2.9.0 2.9.1

Additionally, logback-core dependency scope was changed from compile to provided (#288), and a note was added to the readme indicating that projects that use logstash-logback-encoder must also directly depend on either logback-classic or logback-access, which both transitively depend on logback-core

logstash-logback-encoder-5.1

30 Apr 04:37
Compare
Choose a tag to compare
  • #286 Add ability to output timestamp value as unix timestamps (number or string) (@peterjurkovic)
  • #279 / #285 Add ability to customize character escape codes (@fred84)
  • #283 Added more packages to OSGI exports (@redvasily)
  • #284 Update Jackson verson to 2.9.5 (@msymons)
  • #282 Fix bug that prevented configuring request header filters from logback xml
  • #276 Fix bug that prevented using global custom field provider within nested provider

logstash-logback-encoder-5.0

01 Mar 04:42
Compare
Choose a tag to compare

Overview

Version 5.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.6 has been removed. Java 1.7 or above is now required.

New Features

  • Added Appender Listeners so that applications can receive notifications for the appender lifecycle and event processing. In the future, listeners can be added to implement metrics (#126 ) or customized error handling/reporting (#159, #127). Applications can also provide their own listeners.
  • #194 Added Header Filters for deciding which request/response headers to include in access events
  • #251 Added a #tryJson pattern operation to fall back to just printing the message if the argument is not valid JSON
  • #258 Added a timestampPattern configuration property to LogstashEncoder, LogstashLayout, LogstashAccessEncoder, and LogstashAccessLayout
  • Added CompositeJsonFactoryDecorator and CompositeJsonGeneratorDecorator to make it easier to add multiple decorators.
  • #257 @jackhammer2k Added new throwableClassName and throwableRootCauseClassName JSON providers

Bug fixes / Minor improvements

  • #241 Fixed the pattern JsonProvider to be able to be used within the nestedField JsonProvider
  • #237 Fixed setting the buffer initial capacity of the ShortenedThrowableConverter
  • #243 Documented using dependencyManagment to sync logback dependency versions
  • #259 Upgraded jackson dependencies to 2.9.4 as mentioned in dependency version changes below (@haus contributed to this update)
  • com.fasterxml.uuid:java-uuid-generator is no longer included in the logstash-logback-encoder jar, and is now an optional dependency
  • #240 @robsonbittencourt Fixed anchors in README.md

Dependency version changes

Usage Dependency Old Version New Version
Runtime jackson 2.8.9 2.9.4
Runtime (shaded) disruptor 3.3.4 3.3.8
Compile-time animal-sniffer 1.15 1.16
Test-time assertj 2.4.0 2.9.0
Test-time mockito 1.10.19 2.9.0
Test-time powermock 1.6.5 1.7.3
Test-time commons-io 2.4 2.6

Backwards Incompatibilities

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

  • For #112, the default maxDepthPerThrowable of the ShortenedThrowableConverter has been changed to be full/unlimited to be be better aligned with its other configuration parameters.

    To revert to the old value, specify 25 for the maxDepthPerThrowable as documented here

  • For #138 and #150, access event field names have been changed.

    Old field name New field name
    @fields.content_length content_length
    @fields.elapsed_time elapsed_time
    @fields.method method
    @fields.protocol protocol
    @fields.requested_url requested_url
    @fields.requested_uri requested_uri
    @fields.remote_host remote_host
    @fields.remote_user remote_user
    @fields.status_code status_code
    @fields.HOSTNAME n/a
    @message message

    To revert to the old field names, specify the following in the encoder/layout configuration:

    <fieldNames class="net.logstash.logback.fieldnames.Pre50LogstashAccessFieldNames"/>
  • For #176, the @fields.hostname field has been removed. It's value was always the same as the @fields.remoteHost field value (which is now the remoteHost field)

  • For #169, the arguments JSON provider has been enabled by default in the LogstashEncoder, LogstashLayout, LogstashAccessEncoder, and LogstashAccessLayout

    To disable the arguments provider, specify the following in the encoder/layout configuration:

    <includeStructuredArguments>false</includeStructuredArguments>
  • For #174, the default field type of the @version field has changed from an integer to a string.

    To change the @version field type back to an integer, specify the following in the encoder/layout configuration:

    <writeVersionAsInteger>true</writeVersionAsInteger>

    or, if you are using the version provider directly, specify the following in the version provider configuration:

    <writeAsInteger>true</writeAsInteger>
  • For #261 ESCAPE_NON_ASCII is now disabled by default

    To reenable it, you can use the EscapeNonAsciiJsonFactoryDecorator by specifying the following in the encoder/layout configuration:

    <jsonFactoryDecorator class="net.logstash.logback.decorate.EscapeNonAsciiJsonFactoryDecorator"/>

    If you were already using a jsonFactoryDecorator, you can use the new CompositeJsonFactoryDecorator to add multiple JsonFactoryDecorators

  • Request/response header names are now written in lowercase by default

    To revert to the original behavior, specify the following in the encoder/layout/provider configuration:

    <lowerCaseHeaderNames>false</lowerCaseHeaderNames>

logstash-logback-encoder-4.11

24 Jun 19:37
Compare
Choose a tag to compare
  • #226 / #228 Add ability to calculate hashes of stack traces (via a StackHashJsonProvider and ShortenedThrowableConverter)
  • #230 / #231 Update Jackson to 2.8.9.

logstash-logback-encoder-4.10

03 Jun 05:22
Compare
Choose a tag to compare
  • #195 Add destination connection strategies (preferPrimary, roundRobin, random)
  • #199 Update jackson dependency to 2.8.8.
    • Note that jackson-databind 2.8 requires Java 7+.
    • At this point logstash-logback-encoder should still work with jackson 2.6/2.7, so you can use dependency management to downversion to an older version of jackson if needed
  • #211 Added new asJson operator for the pattern json provider
  • #218 Allow disabling the output stream buffer
  • #219 Add a new provider for generating a random UUID
  • #217 Fix markdown in readme
  • #216 Clarify that HOSTNAME field was removed from logback context in logback 1.1.10