Fix deprecated Log4j2 package scanning warnings#13902
Fix deprecated Log4j2 package scanning warnings#13902KomachiSion merged 3 commits intoalibaba:developfrom
Conversation
|
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
|
This branch was created from version 2.4.3 (the default Nacos version in SCA 2023.0.3.4). After merging, should a new patch version be released? |
|
anyone else ? |
...adapter/src/main/java/com/alibaba/nacos/logger/adapter/log4j2/Log4J2NacosLoggingAdapter.java
Outdated
Show resolved
Hide resolved
logger-adapter-impl/log4j2-adapter/src/main/resources/nacos-log4j2.xml
Outdated
Show resolved
Hide resolved
|
ok, this is bacause my idea set default format style, I'll use text editor to change this file |
ec4534c to
955b21c
Compare
|
@KomachiSion code style have been resolved |
| <properties> | ||
| <maven.compiler.source>${client.java.version}</maven.compiler.source> | ||
| <maven.compiler.target>${client.java.version}</maven.compiler.target> | ||
| <log4j2.version>2.23.1</log4j2.version> |
There was a problem hiding this comment.
这里有个问题,父pom里已经有指定log4j2的版本了
<log4j.version>2.24.3</log4j.version>
如果这里重新定义一个版本,会不会导致一些兼容性问题。
|
@KomachiSion 本地编译过了,已经可以了,项目不熟悉,没看到 项目父 pom.xml已经定义了,麻烦在 rReview 一下 |
|
之前的PR似乎引入了PMD的失败校验, 会在develop分支先修复, 麻烦待修复之后重新同步一下develop分支。 抱歉了。 修复之后会在PR中再at你 |
|
好的 |
|
@fyeeme 麻烦在同步一下develop分支 |
|
已经合并了 @KomachiSion |
|
@fyeeme Welcome submit this change to v2.x-develop with a new PR. |
|
|
|
好的,我晚一点在提交一个PR |
* fix: deprecated Log4j2 package scanning warnings * fix: replace log4j2.version property with log4j.version in log4j2-adapter
* Fix deprecated Log4j2 package scanning warnings (#13902) * fix: deprecated Log4j2 package scanning warnings * fix: replace log4j2.version property with log4j.version in log4j2-adapter * revert: log4j2 config * feat: add root level config for log4j
What is the purpose of the change
Fix #12102 deprecated Log4j2 package scanning warnings
Brief changelog
According to Log4j 2.19.1 updates, package scanning functionality has been deprecated (LOG4J2-3644), requiring removal of:
Key changes:
The new implementation uses Log4j annotation processor to automatically discover @plugin annotated classes during compilation,
generating Log4j2Plugins.dat file for modern plugin discovery mechanism.
This maintains full functionality of NacosClientPropertiesLookup plugin
while eliminating all deprecated method warnings.
Resolves warning:
WARN The use of package scanning to locate Log4j plugins is deprecated.
log4j Registering plugins