fix: resolve SLF4J and Logback compatibility issues#768
fix: resolve SLF4J and Logback compatibility issues#768GOODBOY008 wants to merge 1 commit intoapache:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses SLF4J and Logback compatibility issues by removing the slf4j-simple binding in favor of logback-classic and fixing Logback configuration files to remove Spring Boot-specific elements that are not supported in standard Logback.
Key changes:
- Removed
slf4j-simpledependency and its version property from the parent POM - Downgraded
logback-classicversion from 1.5.23 to 1.2.13 - Updated
fesod-sheettest logback configuration to use standard Logback properties instead of Spring Boot includes
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pom.xml | Removed slf4j-simple dependency and version property, downgraded logback-classic version to 1.2.13, and removed slf4j-simple from parent dependencies |
| fesod-sheet/src/test/resources/logback.xml | Replaced Spring Boot logback include with standard property definition and changed root log level from DEBUG to INFO |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fb318b3 to
e130906
Compare
|
why not upgrade to slf4j 2.x ? |
|
@alaahong It’s fine for me to upgrade SLF4J to 2.x, as long as we can reach a consensus.Considered both options—upgrading SLF4J and staying with SLF4J 1.7.x. To minimize risk and scope of change, I chose the minimal-change approach by downgrading logback-classic. Issue:Compatibility Issue
Redundant Issue
Log output in console (Before)
Log output in console (Remove slf4j-simple)
Log output in console (Apply the current pr)
|
c1edafc to
f5cae74
Compare
|
@alaahong PR updated. SLF4J has been upgraded to 2.x, and logback-classic has been downgraded to 1.3.x to maintain Java 8 compatibility.
Reference:Java Logging Part 2: Logging and Package Exclusion with SLF4J + Logback |
f5cae74 to
1edbfb4
Compare
1edbfb4 to
a942370
Compare
|
@delei PTAL,If you have time, Thank you~ |




Summary
This PR fixes the compatibility issue between logback-classic and slf4j-api, and removes the erroneous Spring Boot configuration from logback.xml.
Changes
1. Update logback-classic version (pom.xml)
2. Update slf4j-api version (pom.xml)
3. Replace log bridging dependencies (pom.xml)
4. Fix logback.xml configuration
Compatibility Matrix