diff --git a/bin/beeline b/bin/beeline
index 3581f6dd6bd..9fd2c9ba02a 100755
--- a/bin/beeline
+++ b/bin/beeline
@@ -50,4 +50,8 @@ else
KYUUBI_BEELINE_CLASSPATH="${KYUUBI_BEELINE_JARS}/*:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}"
fi
+if [[ -f ${KYUUBI_CONF_DIR}/log4j2-repl.xml ]]; then
+ KYUUBI_CTL_JAVA_OPTS="${KYUUBI_CTL_JAVA_OPTS} -Dlog4j2.configurationFile=log4j2-repl.xml"
+fi
+
exec ${RUNNER} ${KYUUBI_BEELINE_OPTS} -cp ${KYUUBI_BEELINE_CLASSPATH} $CLASS "$@"
diff --git a/bin/kyuubi-admin b/bin/kyuubi-admin
index a1f176ec157..689b626dd9f 100755
--- a/bin/kyuubi-admin
+++ b/bin/kyuubi-admin
@@ -45,4 +45,8 @@ else
KYUUBI_CLASSPATH="${KYUUBI_JAR_DIR}/*:${KYUUBI_CONF_DIR}:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}"
fi
+if [[ -f ${KYUUBI_CONF_DIR}/log4j2-repl.xml ]]; then
+ KYUUBI_CTL_JAVA_OPTS="${KYUUBI_CTL_JAVA_OPTS} -Dlog4j2.configurationFile=log4j2-repl.xml"
+fi
+
exec ${RUNNER} ${KYUUBI_CTL_JAVA_OPTS} -cp ${KYUUBI_CLASSPATH} $CLASS "$@"
diff --git a/bin/kyuubi-ctl b/bin/kyuubi-ctl
index 16809c0754b..10e1121251d 100755
--- a/bin/kyuubi-ctl
+++ b/bin/kyuubi-ctl
@@ -45,4 +45,8 @@ else
KYUUBI_CLASSPATH="${KYUUBI_JAR_DIR}/*:${KYUUBI_CONF_DIR}:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}"
fi
+if [[ -f ${KYUUBI_CONF_DIR}/log4j2-repl.xml ]]; then
+ KYUUBI_CTL_JAVA_OPTS="${KYUUBI_CTL_JAVA_OPTS} -Dlog4j2.configurationFile=log4j2-repl.xml"
+fi
+
exec ${RUNNER} ${KYUUBI_CTL_JAVA_OPTS} -cp ${KYUUBI_CLASSPATH} $CLASS "$@"
diff --git a/bin/kyuubi-zk-cli b/bin/kyuubi-zk-cli
index f503c3e5a5e..00da1f485e3 100755
--- a/bin/kyuubi-zk-cli
+++ b/bin/kyuubi-zk-cli
@@ -45,4 +45,8 @@ else
KYUUBI_CLASSPATH="${KYUUBI_JAR_DIR}/*:${KYUUBI_CONF_DIR}:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}"
fi
-exec ${RUNNER} ${KYUUBI_JAVA_OPTS} -cp ${KYUUBI_CLASSPATH} $CLASS "$@"
\ No newline at end of file
+if [[ -f ${KYUUBI_CONF_DIR}/log4j2-repl.xml ]]; then
+ KYUUBI_CTL_JAVA_OPTS="${KYUUBI_CTL_JAVA_OPTS} -Dlog4j2.configurationFile=log4j2-repl.xml"
+fi
+
+exec ${RUNNER} ${KYUUBI_JAVA_OPTS} -cp ${KYUUBI_CLASSPATH} $CLASS "$@"
diff --git a/conf/log4j2-repl.xml.template b/conf/log4j2-repl.xml.template
new file mode 100644
index 00000000000..0c5fc78b2d3
--- /dev/null
+++ b/conf/log4j2-repl.xml.template
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/log4j2.xml.template b/conf/log4j2.xml.template
index 215fddf47f4..c2db4c4750d 100644
--- a/conf/log4j2.xml.template
+++ b/conf/log4j2.xml.template
@@ -30,9 +30,6 @@
-
-
-
@@ -55,7 +52,7 @@
-
+