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 byjava.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 theLoggerContext
is configured with aSequenceNumberGenerator
(see Logback). This number can later be retrieved from the event itself by calling the newly introducedgetSequenceNumber()
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
-
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 is0
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
🐞 Bug fixes
- Fix absolute PathMask issue by @brenuart in #845
- Fix non-JSON generators (regression in 7.0) by @philsttr in #930
📖 Documentation, Tests and Build
- Fix hyperlinks in README by @cand126 in #869
- Use instead of nested appenders in XML configuration by @brenuart in #875
- Bump github actions to their latest version by @brenuart in #884
- Fix link in readme by @wsargent in #887
- Bump build to JDK 17 by @philsttr in #924
- Setup release notes categories for automatic release notes generation by @philsttr in #927
- Remove usage of the animal-sniffer-maven-plugin by @brenuart in #932
🆙 Dependency Upgrades
- Bump to Logback 1.3.0-beta0 by @brenuart in #832
- Bump assertj-core from 3.22.0 to 3.23.1 by @dependabot in #814
- Bump mockito.version from 4.5.1 to 4.7.0 by @dependabot in #834
- Bump maven-bundle-plugin from 5.1.6 to 5.1.8 by @dependabot in #825
- Bump maven-enforcer-plugin from 3.0.0 to 3.1.0 by @dependabot in #816
- Bump junit-bom from 5.8.2 to 5.9.0 by @dependabot in #835
- Bump maven-resources-plugin from 3.2.0 to 3.3.0 by @dependabot in #838
- Bump maven-javadoc-plugin from 3.4.0 to 3.4.1 by @dependabot in #839
- Bump extra-enforcer-rules from 1.5.1 to 1.6.1 by @dependabot in #822
- Bump maven-install-plugin from 3.0.0-M1 to 3.0.1 by @dependabot in #836
- Bump animal-sniffer-maven-plugin from 1.21 to 1.22 by @dependabot in #841
- Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 by @dependabot in #844
- Bump jackson-bom from 2.13.3 to 2.13.4 by @dependabot in #851
- Bump mockito.version from 4.7.0 to 4.8.0 by @dependabot in #852
- Bump logback.version from 1.3.0 to 1.3.1 by @dependabot in #853
- Bump maven-shade-plugin from 3.3.0 to 3.4.0 by @dependabot in #854
- Bump maven-jar-plugin from 3.2.2 to 3.3.0 by @dependabot in #856
- Bump junit-bom from 5.9.0 to 5.9.1 by @dependabot in #858
- Bump logback.version from 1.3.1 to 1.3.3 by @dependabot in #866
- Bump logback.version from 1.3.3 to 1.3.4 by @dependabot in #873
- Bump jackson-bom from 2.13.4 to 2.13.4.20221012 by @dependabot in #879
- Bump jackson-bom from 2.13.4.20221012 to 2.13.4.20221013 by @dependabot in #880
- Bump mockito.version from 4.8.0 to 4.8.1 by @dependabot in #886
- Bump maven-shade-plugin from 3.4.0 to 3.4.1 by @dependabot in #888
- Bump Jackson from 2.13.4.20221013 to 2.14.0 by @brenuart in #895
- Bump jackson-bom from 2.14.0 to 2.14.1 by @dependabot in #905
- Bump mockito.version from 4.8.1 to 4.9.0 by @dependabot in #900
- Bump maven-install-plugin from 3.0.1 to 3.1.0 by @dependabot in #902
- Bump logback.version from 1.3.4 to 1.3.5 by @dependabot in #903
- Bump assertj-core from 3.23.1 to 3.24.2 by @dependabot in #917
- Bump maven-checkstyle-plugin from 3.2.0 to 3.2.1 by @dependabot in #916
- Bump junit-bom from 5.9.1 to 5.9.2 by @dependabot in #915
- Bump mockito.version from 4.9.0 to 5.1.1 by @dependabot in #923
- Bump java-uuid-generator from 4.0.1 to 4.1.0 by @dependabot in #913
- Bump to checkstyle 10.7.0 by @philsttr in #925
- Bump jackson-bom from 2.14.1 to 2.14.2 by @dependabot in #928
- Bump maven-enforcer-plugin from 3.1.0 to 3.2.1 by @dependabot in #929
- Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 by @dependabot in #935
New Contributors
Full Changelog: logstash-logback-encoder-7.2...logstash-logback-encoder-7.3