Welcome to the new major release
This release introduces major changes to cf-java-logging-support. The library now requires Java 17.x+ and SLF4J 2.x+. If you need support for older versions (including javax.servlet) please stay on the 3.x release.
Noticable changes
If you upgrade from an earlier release of this library, you should be able to keep your current configuration. But you might need to change your dependencies to accommodate for the renaming of cf-java-logging-support-servlet-jakarta to cf-java-logging-support-servlet. This is likely to be the only breaking change.
Upgrades
- Java 17 is required (except for OpenTelemetry Java Agent extension which need Java 11)
- Jakarta Servlet API only
- SLF4j 2.x and corresponding versions of Logback and Log4j2
Removals
- cf-java-logging-support-servlet-jakarta (moved to cf-java-logging-support-servlet)
- cf-java-logging-support-jersey
- cf-java-monitoring-custom-metrics-clients/*
- sample app using Jersey
Note, that for sending custom metrics it is recommended to use the OpenTelemetry Java Agent with the cf-java-logging-support-opentelemetry-agent-extension.
New Features
- Support for key-value-pairs in SLF4J's fluent API
- SPI extensions points for
ContextFieldSupplier,LogbackContextFieldSupplier, andLog4jContextFieldSupplierDynamicLogLevelConfigurationandDynamicLogLevelProcessor
- auto-detection of service bindings to SAP Application Logging service for SAP BTP and formatting of custom fields accordingly
Breaking Changes
The main branch was force-pushed to contain the 4.x version of the library. You may need to reset your local repository, if you checked out the code before the creation of the release candidates.
The dynamic log level feature has been refactored. It now requires cf-java-logging-support-servlet-dynlog-jwt as additional dependency. The original configuration still applies but if you implemented custom extensions you likely need to integrate with the new extension points. Please have a look at the Spring Boot Sample App that includes a custom integration with the dynamic log level feature.
What's Changed
- Draft Release 4: Basic Changes by @KarstenSchnitter in #173
- Integration of recent changes on main by @KarstenSchnitter in #196
- Fix Mocking in Unit Test by @KarstenSchnitter in #197
- Support SPI Loading of ContextFieldSuppliers for Logback by @KarstenSchnitter in #198
- Introduce SPI Loading for Log4j ContextFieldSuppliers by @KarstenSchnitter in #199
- Support SLF4J Key-Value-Pairs by @KarstenSchnitter in #200
- Extract JWT Implementation for Dynamic Log Levels by @KarstenSchnitter in #203
- Detect Bindings to SAP Application Logging Service by @KarstenSchnitter in #204
Full Changelog: v3.8.6...4.0.0