-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[ISSUE #9860] abstract the nacos logback configurator to solve the problem between different version #9934
[ISSUE #9860] abstract the nacos logback configurator to solve the problem between different version #9934
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #9934 +/- ##
=============================================
+ Coverage 47.35% 50.50% +3.14%
- Complexity 4536 4837 +301
=============================================
Files 864 865 +1
Lines 28128 27506 -622
Branches 3138 3035 -103
=============================================
+ Hits 13320 13891 +571
+ Misses 13599 12389 -1210
- Partials 1209 1226 +17
Continue to review full report at Codecov.
|
* | ||
* @author hujun | ||
*/ | ||
public class NacosClientLogbackProperties implements NacosLogbackProperties { |
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.
What's the usage of NacosLogbackProperties?
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.
当前的版本有个nacos的NacosClientProperties xml标签适配了logback,但是NacosClientProperties在nacos-client包.
这样的目的是为了方便适配logback的组件(logback-adapter)可以在不依赖nacos-client包的情况下调用到NacosClientProperties,从而也能调用到NacosClientProperties
issue:#9860
修改方案:
1.通过判断高版本的类是否存在选择不同版本的api
2.通过spi的方式+新增logback-adapter的依赖解决不同版本api存在同一个项目中编译报错的问题,依赖项目https://github.com/nacos-group/logback-adpater
测试场景:
1.2.9 版本的logback的demo服务使用该依赖启动可正常加载logback配置
1.4.5 版本的logback的demo服务使用该依赖启动可正常加载logback配置
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.