sofastack / sofa-serverless

a framework to enabe app architecture evolve from monolithic to microservices smoothly by involving modular and macroservices architecture.
https://sofaserverless.gitee.io/home/
Apache License 2.0
115 stars 41 forks source link

复写Log4jLogger,适配多模块下static final修饰的Logger情况使用 #478

Open suntaiming opened 7 months ago

suntaiming commented 7 months ago

每次调用日志打印 根据当前线程上下文类加载器动态获取Logger

sofastack-cla[bot] commented 7 months ago

Hi @suntaiming, 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.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 168 lines in your changes are missing coverage. Please review.

Comparison is base (1ec069f) 81.00% compared to head (463e781) 71.17%. Report is 34 commits behind head on master.

:exclamation: Current head 463e781 differs from pull request most recent head c43ff00. Consider uploading reports for the commit c43ff00 to get more accurate results

Files Patch % Lines
...ain/java/org/apache/logging/slf4j/Log4jLogger.java 0.00% 168 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #478 +/- ## ============================================ - Coverage 81.00% 71.17% -9.84% Complexity 64 64 ============================================ Files 46 47 +1 Lines 1216 1384 +168 Branches 113 120 +7 ============================================ Hits 985 985 - Misses 170 338 +168 Partials 61 61 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lvjing2 commented 7 months ago

麻烦再补充两点内容

  1. 在 log4j2 的 samples 里再补充个case
  2. log4j2 的适配原理 补充下适配的原理
suntaiming commented 7 months ago

麻烦再补充两点内容

  1. 在 log4j2 的 samples 里再补充个case
  2. log4j2 的适配原理 补充下适配的原理

已补充