diff --git a/distribution/server/pom.xml b/distribution/server/pom.xml
index 6177782aad3bd..696be14027ccd 100644
--- a/distribution/server/pom.xml
+++ b/distribution/server/pom.xml
@@ -244,6 +244,18 @@
*
*
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ log4j
+ *
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+
diff --git a/pulsar-functions/runtime-all/pom.xml b/pulsar-functions/runtime-all/pom.xml
index 04396667ad69a..8168da55f7ac9 100644
--- a/pulsar-functions/runtime-all/pom.xml
+++ b/pulsar-functions/runtime-all/pom.xml
@@ -103,10 +103,10 @@
slf4j-api
-
- org.apache.logging.log4j
- log4j-slf4j-impl
-
+
+
+
+
org.apache.logging.log4j