github logfellow/logstash-logback-encoder logstash-logback-encoder-7.3

This new version brings support for the new features introduced in Logback 1.3 while remaining compatible with both Logback 1.2 (can be used with both versions).

What's Changed

⚠️ Update considerations and deprecations

  • Support for Timestamp with nanosecond precision (logback 1.3+) by @brenuart in #833
    TimestampJsonProvider has been upgraded to take advantage of the nanosecond precision introduced in Logback 1.3 when recording event timestamp.

    When upgrading to Logback 1.3, people using one of the standard java.time.DateTimeFormatter formats like [ISO_OFFSET_DATE_TIME] (see documentation for more information) will have their timestamp rendered with nanoseconds instead of millis. If this is not desired you should instead configure the explicit format you need instead of making reference to one of the standard formats provided by java.time.DateTimeFormatter.

  • Add support for Event#getSequenceNumber (logback 1.3+) by @brenuart in #843
    Starting from version 1.3 Logback can assign a unique sequence number to each event as long as the LoggerContext is configured with a SequenceNumberGenerator (see Logback). This number can later be retrieved from the event itself by calling the newly introduced getSequenceNumber() method.

    The SequenceJsonProvider has been upgraded to leverage this new feature. The actual behaviour depends on which version of Logback is found on the class path at runtime:

    • Logback >= 1.3: get the sequence value from the event itself provided a SequenceNumberGenerator is defined in the LoggerContext. If not, revert to using a locally incremented sequence number (old behaviour)
    • Logback < 1.3: use a locally incremented sequence number (old behaviour)

    If this behaviour is not desired, you have the choice to set your own custom strategy (see the documentation for more information).

  • ShortenedThrowableConverter: <exclude> and <exclusions> are mutually exclusive (#876) by @brenuart in #881

  • Add ability to customize the PrettyPrinter by @philsttr in #926

✨ New features and improvements

  • Add support for multiple Markers attached to a single LoggingEvent by @brenuart in #840

  • 848 ipv6 support in DestinationParser by @brenuart in #849

  • Implement initialSendDelay feature by @brenuart in #860
    It may happen you want to add an extra delay before sending the first events after the connection is established. This may come in handy in situations where the appender connects to an intermediate proxy that needs some time to establish a connection to the final destination. Without this extra delay, the first events written by the appender immediately after the connection to the proxy is created may be lost if the proxy ultimately fails to connect to the final destination.

    To enable this feature, set the new initialSendDelay property to the desired value. The default value is 0 which means "no delay", that is start flushing events immediately after the connection is established. See Initial Send Delay for more information.

  • 859 LogstashEncoder should throw IllegalArgumentException instead of logging an error status when attempting to use by @brenuart in #861

  • 867 shortenedthrowableconverter truncate stacktrace based on regex pattern by @brenuart in #874
    The ShortenedThrowableConverter now allows you to shorten the stacktrace by cutting it just after frames matching a regular expression. See Truncate after Regex in the documentation for more details about this new feature.

  • Add a way to escape the comma in comma separated property values by @brenuart in #882

  • ShortenedThrowableConverter: add option to set my own custom abbreviator by @brenuart in #893

  • Build consumer (flatten) POM by @brenuart in #898

🐞 Bug fixes

📖 Documentation, Tests and Build

🆙 Dependency Upgrades

New Contributors

Full Changelog: logstash-logback-encoder-7.2...logstash-logback-encoder-7.3

Don't miss a new logstash-logback-encoder release

NewReleases is sending notifications on new releases.