-
Notifications
You must be signed in to change notification settings - Fork 463
fix: resolve SLF4J and Logback compatibility issues #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
- Downgrade logback-classic from 1.5.23 to 1.2.13 to ensure compatibility with slf4j 1.7.x API (logback 1.5.x requires slf4j 2.x) - Remove unused slf4j-simple dependency (conflicts with logback-classic) - Replace Spring Boot logback defaults.xml include with explicit log pattern to remove Spring Boot dependency from test logging configuration - Change default log level from DEBUG to INFO for cleaner test output
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)
|



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. Downgrade logback-classic version (pom.xml)
2. Remove slf4j-simple dependency (pom.xml)
3. Fix logback.xml configuration (fesod-sheet/src/test/resources/logback.xml)