Browse Source

Pull request #4357: KERNEL-9862 druid log4j2的适配

Merge in CORE/base-third from ~XIQIU/base-third:feature/x to feature/x

* commit '36805e2dbf31cccdd9bd85a057e74f87b2f9e37d':
  KERNEL-9862 补上被误删的代码
  KERNEL-9862 druid log4j2的适配
feature/x
Dylan.Liu 3 years ago
parent
commit
2c579b2600
  1. 3
      fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java

3
fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java

@ -38,7 +38,10 @@ public class LogFactory {
tryImplementation("java.util.logging.Logger", "com.fr.third.alibaba.druid.support.logging.Jdk14LoggingImpl");
}
}
// 优先选择log4j2防止漏洞
tryImplementation("com.fr.third.apache.logging.log4j.Logger", "FRLog4j2Impl");
// 优先选择log4j,而非Apache Common Logging. 因为后者无法设置真实Log调用者的信息
tryImplementation("com.fr.third.apache.log4j.Logger", "FRLog4jImpl");
tryImplementation("org.slf4j.Logger", "com.fr.third.alibaba.druid.support.logging.SLF4JImpl");
tryImplementation("org.apache.log4j.Logger", "com.fr.third.alibaba.druid.support.logging.Log4jImpl");
tryImplementation("org.apache.logging.log4j.Logger", "com.fr.third.alibaba.druid.support.logging.Log4j2Impl");

Loading…
Cancel
Save