-
Notifications
You must be signed in to change notification settings - Fork 41
add sofa-serverless-adapter-logback #305
add sofa-serverless-adapter-logback #305
Conversation
Hi @chenlei3641, welcome to SOFAStack community, Please sign Contributor License Agreement! After you signed CLA, we will automatically sync the status of this pull request in 3 minutes. |
update master
# Conflicts: # sofa-serverless-runtime/sofa-serverless-adapter-ext/pom.xml
@lvjing2 有空看下,后面怎么弄 |
@yuanyuancin 这几天会看下,另外方便加下开发者沟通群吗?这是个比较重要的 adapter,希望能再群里能更方便的沟通。 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #305 +/- ##
============================================
- Coverage 82.88% 82.35% -0.54%
- Complexity 66 131 +65
============================================
Files 40 38 -2
Lines 1005 918 -87
Branches 91 77 -14
============================================
- Hits 833 756 -77
+ Misses 119 115 -4
+ Partials 53 47 -6 ☔ View full report in Codecov by Sentry. |
这个feature的核心是为了解决serverless合并部署场景下,多biz使用logback、支持biz独立的日志配置、上下文隔离; 需要增加sample验证一下方案可行性(可以参考log4j2 sample搭建在工程sample目录下)验证过程中可能需要考虑下:
|
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.
- Adapter的能力合并到 ContextSelector就行啦,不需要两个类
- 不只是biz启动期会 getContext,运行期,需要考虑运行期如果tccl非biz classloader的情况,考虑通过 callerClass classloader?
- ContextSelector.detachLoggerContext 实现remove逻辑
- context name可以使用 String contextName = Integer.toHexString(System.identityHashCode(bizClassloader));
...main/java/com/alipay/sofa/serverless/logback/SOFAServerlessLogbackSpringContextListener.java
Show resolved
Hide resolved
LGTM |
[### Motivation
Explain the context, and why you're making that change.
To make others understand what is the problem you're trying to solve.
Modification
Describe the idea and modifications you've done.
Result
Resolved or fixed #.
If there is no issue then describe the changes introduced by this PR.
](#274)