panbingkun commented on code in PR #45784: URL: https://github.com/apache/spark/pull/45784#discussion_r1545536535
########## common/utils/src/test/scala/org/apache/spark/util/PatternLoggingSuite.scala: ########## @@ -16,24 +16,27 @@ */ package org.apache.spark.util +import org.apache.logging.log4j.Level import org.scalatest.BeforeAndAfterAll import org.apache.spark.internal.Logging class PatternLoggingSuite extends LoggingSuiteBase with BeforeAndAfterAll { - override protected def logFilePath: String = "target/pattern.log" + override def className: String = classOf[PatternLoggingSuite].getSimpleName + override def logFilePath: String = "target/pattern.log" override def beforeAll(): Unit = Logging.disableStructuredLogging() override def afterAll(): Unit = Logging.enableStructuredLogging() - override def expectedPatternForBasicMsg(level: String): String = - s""".*$level PatternLoggingSuite: This is a log message\n""" Review Comment: Let's make full use of the variable `className` to eliminate hard coding text `PatternLoggingSuite` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org