Skip to content

Conversation

@GOODBOY008
Copy link
Member

@GOODBOY008 GOODBOY008 commented Dec 28, 2025

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)

  • Changed `logback-classic.version` from `1.5.23` to `1.2.13`
  • Logback 1.5.x requires SLF4J 2.x, but this project uses SLF4J 1.7.36
  • Logback 1.2.13 is compatible with SLF4J 1.7.x

2. Remove slf4j-simple dependency (pom.xml)

  • Removed `slf4j-simple` from dependency management and dependencies
  • Having both `slf4j-simple` and `logback-classic` causes SLF4J binding conflicts
  • Only `logback-classic` should be used as the SLF4J implementation

3. Fix logback.xml configuration (fesod-sheet/src/test/resources/logback.xml)

  • Removed `<include resource="org/springframework/boot/logging/logback/defaults.xml"/>`
    • This Spring Boot specific resource doesn't exist in test classpath
  • Added explicit `CONSOLE_LOG_PATTERN` property definition
  • Changed root log level from `DEBUG` to `INFO` for cleaner test output

Copilot AI review requested due to automatic review settings December 28, 2025 12:30
Copy link
Contributor

Copilot AI left a 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-simple dependency and its version property from the parent POM
  • Downgraded logback-classic version from 1.5.23 to 1.2.13
  • Updated fesod-sheet test 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.

@GOODBOY008
Copy link
Member Author

@alaahong @delei lei PTAL

- 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
@alaahong
Copy link
Member

why not upgrade to slf4j 2.x ?
And meanwhile, can you also attach the screenshot of actual execution log?

@GOODBOY008
Copy link
Member Author

@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

  • Logback 1.5.x requires SLF4J 2.0.x, but this project uses SLF4J 1.7.36

Redundant Issue

  • The project has both slf4j-simple and logback-classic as test dependencies,slf4j-simple and logback-classic are competing SLF4J implementations

Log output in console (Before)

image

Log output in console (Remove slf4j-simple)

image

Log output in console (Apply the current pr)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants