diff --git a/core/src/test/scala/org/apache/spark/util/logging/DriverLoggerSuite.scala b/core/src/test/scala/org/apache/spark/util/logging/DriverLoggerSuite.scala index f5c47df94a2b4..97cd5caaac907 100644 --- a/core/src/test/scala/org/apache/spark/util/logging/DriverLoggerSuite.scala +++ b/core/src/test/scala/org/apache/spark/util/logging/DriverLoggerSuite.scala @@ -97,7 +97,9 @@ class DriverLoggerSuite extends SparkFunSuite with LocalSparkContext { test("SPARK-44214: DriverLogger.apply returns None when only spark.driver.log.localDir exists") { val sparkConf = new SparkConf() assert(DriverLogger(sparkConf).isEmpty) - assert(DriverLogger(sparkConf.set(DRIVER_LOG_LOCAL_DIR, "file://tmp/")).isEmpty) + withTempDir { dir => + assert(DriverLogger(sparkConf.set(DRIVER_LOG_LOCAL_DIR, dir.getCanonicalPath)).isEmpty) + } } private def getSparkContext(): SparkContext = { diff --git a/docs/configuration.md b/docs/configuration.md index dfded480c99d3..6f7e12555e8e8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -430,6 +430,14 @@ of the most common options to set are:
spark.driver.log.localDir
spark.driver.log.dfsDir
spark.driver.log.layout
spark.driver.log.dfsDir
. If this is not configured,
+ The layout for the driver logs that are synced to spark.driver.log.localDir
and spark.driver.log.dfsDir
. If this is not configured,
it uses the layout for the first appender defined in log4j2.properties. If that is also not configured, driver logs
use the default layout.