Browse Source

KERNEL-9862 druid log4j2的适配

feature/x
xiqiu 3 years ago
parent
commit
28658b71e5
  1. 2
      fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java

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

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

Loading…
Cancel
Save