From 28658b71e57abe473bbeeac245e893b6c0e6bd45 Mon Sep 17 00:00:00 2001 From: xiqiu Date: Fri, 10 Dec 2021 17:04:43 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-9862=20druid=20log4j2=E7=9A=84=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/third/alibaba/druid/support/logging/LogFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java index 96a266784..2db9794cb 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/support/logging/LogFactory.java +++ b/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"); } } + // 优先选择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.apache.log4j.Logger", "Log4jImpl");