zhenlineo commented on code in PR #40581:
URL: https://github.com/apache/spark/pull/40581#discussion_r1152274921
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/connect/client/util/IntegrationTestUtils.scala:
##########
@@ -43,7 +45,27 @@ object IntegrationTestUtils {
}
sys.props.getOrElse("spark.test.home", sys.env("SPARK_HOME"))
}
- private[connect] val isDebug = System.getProperty(DEBUG_SC_JVM_CLIENT,
"false").toBoolean
+
+ private[connect] lazy val debugConfig: Seq[String] = {
+ val log4j2 =
s"$sparkHome/connector/connect/client/jvm/src/test/resources/log4j2.properties"
+ if (isDebug) {
+ Seq(
+ // Enable to see the server plan change log
+ // "--conf",
+ // "spark.sql.planChangeLog.level=WARN",
+
+ // Enable to see the server grpc received
+ // "--conf",
+ // "spark.connect.grpc.interceptor.classes=" +
+ // "org.apache.spark.sql.connect.service.LoggingInterceptor",
+
+ // Redirect server log into console
+ "--conf",
+ s"spark.driver.extraJavaOptions=-Dlog4j.configuration=$log4j2",
+ "--conf",
Review Comment:
I tried
`s"spark.driver.extraJavaOptions=-Dlog4j.configurationFile=$log4j2"`, but the
logs is not picked up? Do you know what is the correct way to use
`log4j.configurationFile`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]