Closed aajtodd closed 11 months ago
Awesome, this issue was blocking us from updating past 0.28.1.
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities
0 Security Hotspots
2 Code Smells
No Coverage information
9.8% Duplication
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
Issue \
fixes https://github.com/awslabs/aws-sdk-kotlin/issues/993
Description of changes
This PR provides automatic fallback to SLF4J 1.x compatible logging implementation when 2.x API can't be loaded. 2.x is binary compatible with 1.x but it does contain some new APIs that aren't available in 1.x (namely the fluent builder APIs). We could just map everything to a 1.x compatible API but it's not guaranteed to be the best mapping since underlying logging implementations may be more efficient than our compatibility layer can achieve.
Alternative
I was able to solve this differently by creating a separate 1.x implementation and then using Gradle component metadata rules to replace the underlying 2.x implementation we ship by default. I decided that fallback by default is a better customer experience though.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.